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 operatorwhich have no idea means, nor understand how 2 blocks of code differ.

mwindow should class data member, not function.

first block of code initializes it.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -