Hi guys,
As my first post, i'd like to post something usefull instead of "Hi, i'm new here".
The reason for this topic is because i don't understand a few things, mostly about classes.
Here are the things i don't understand:
1) Why do some people set a "_" before things like function names?
I've seen this a few times, and asked myself if it had or didn't have any use.
2) For this one, you should look at a simple code:
class TutorialApplication : public ExampleApplication
{
protected:
public:
TutorialApplication()
{
}
~TutorialApplication()
{
}
protected:
void createScene(void)
{
}
};
First i'd like to say that this isn't my code, second i'd like to say that somewere in the source code there is a class definded with the name ExampleApplication.
Now comes my question:
As you can see in the first line, after class TutorialApplication comes something else.
but what is the function of that? It confuses me.
3) My last question:
as you can see, there are 2 public functions defined:
TutorialApplication()(which i think is a constructor)
But there is also "~TutorialApplication()" which confuses me, what does it do? i mean with that strange "~" which i've seen for the first time...
EDIT: Another question: Why is on line 3 and 4 defined first protected and then public? does it have any function?
EDIT2: Another question: What can virtual functions do and why are they used?
Thanks in advance,
Tigran