C++ SFML member initializer -
i'm confused @ moment. it's been while since touched c++ , want again, i'm trying use sfml, , i'm using guide along side it. thing gets me code.
game::game():mwindow(sf::videomode(640, 480), "sfml application") { }
it works perfectly, , think understand. it's initializing mwindow, , when mwindow constructed, creates window. no problem. when put code down.
game::game() { mwindow(sf::videomode(640, 480), "sfml application"); }
it gives me error type 'sf::renderwindow' not provide call operator
which have no idea means, nor understand how 2 blocks of code differ.
mwindow
should class data member, not function.
Comments
Post a Comment