Whats the difference between Methods and Members in C++? -
this beginner question. i'm pretty sure many people had doubt still didn't find clearfy mind, maybe i'm looking in wrong direction or conception. thing is, can work both codes:
sf::clock clock; clock.getelapsedtime(); sf::clock getelapsedtime();
both accepted through ide can't understand difference. programm other languages know clock.getelapsedtime();
return time during app open, sf::clock getelapsedtime();
exactly?
thanks in advance
first calls member function getelapsedtime
through object named clock
while,
second declares non-member (free) function name getelapsedtime
returns object of type sf::clock
, takes no arguments.
good read:
what function declaration?
Comments
Post a Comment