I have googled alot and i find absolutely nothing on this subject.
if i call a function this inside a class with the this pointer does it return from the current function?
Maybe calling member functions with the this pointer is no good idea?
I found it useful for making the code "Sorted" and it looked good for me.
I excuse my bad english!
Thank you in advance!
EDIT: I wrote a program to test this. I dont know why i didnt thought of that before. It did not return. Is it possible to make it return and call a member function using the this pointer at the same time?
This should mean that you call func2() of thisclass in func1().
But why would you want to do that if you already have all the privileges to call any function/data in thisclass by
1 2 3 4 5 6 7 8 9 10 11
class thisclass
{
void func1()
{
func2() //<--No need to use this pointer
}
void func2()
{
//Do something else!
}
};
Oh, this is embarrasing. Im am currently working on a SDL game and i wanted to make a class for my game and call all the class member functions from the gameloop function. and i thougt you could only call member functions using the this keyword. But i dont know where i have got that from. Hehe. Well thank you! :)