理由はわかりませんが、クラスでウィンドウを作成するときにエラーが発生します。
エラーは次のとおりです。
game.cpp(11): error C2064: term does not evaluate to a function taking 2 arguments
私はこれの原因を理解していません、責任はクラスのコンストラクターにあります:
window.cpp
Application::Application(std::map<string,string>& s, std::map<string, string>& t){
settings = s;
theme = t;
window(sf::VideoMode(800, 600), "Test"); //error is here
}
私のヘッダーwindow.h
では、プライベートで次のように設定されています。
private:
std::map<string, string> settings;
std::map<string, string> theme;
sf::RenderWindow window;
私main.cpp
はそれを次のように設定します:
Application game(setting,style);
これの原因は何でしょうか?