If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
HelloKitty
Post
by HelloKitty » Wed Jun 08, 2005 12:16 am
Hi. I sure that the answer is in the API or w.e its called but I cant find it.
Its a quick question. Whats the difference from IrrlichtDevice*
and
...where the '*' goes.
Thank you so much
HelloKitty
Post
by HelloKitty » Wed Jun 08, 2005 12:17 am
Sorry, I screwed up the firsst part. It should be
Midnight
Posts: 1772 Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland
Post
by Midnight » Wed Jun 08, 2005 12:24 am
lol I used to wonder about this also.
go take a tutorial on pointers.
IrrlichtDevice* is a pointer to the internal decive code.
IrrlichtDevice *device would be a pointer to your device...
at least I think thats how it works lol
HelloKitty
Post
by HelloKitty » Wed Jun 08, 2005 12:53 am
LOL. Thanks for the help.
bitplane
Admin
Posts: 3204 Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:
Post
by bitplane » Thu Jun 09, 2005 12:12 pm
whitespace is irrelevant, you will be assimilated.
they're both the same.
aigam
Posts: 17 Joined: Fri May 06, 2005 3:17 pm
Post
by aigam » Thu Jun 09, 2005 12:50 pm
All of them are pointers to device.
You must read a basic c++ book...
bitplane
Admin
Posts: 3204 Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:
Post
by bitplane » Thu Jun 09, 2005 1:34 pm
yes, we publicly spank you Midnight for posting more than you read
I knew this would come in useful...
Code: Select all
void punish()
{
Net.SuperNanny -> SpankBottom();
punish();
}
punish();
Midnight
Posts: 1772 Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland
Post
by Midnight » Thu Jun 09, 2005 7:44 pm
Good lord...
Trust me I read more then I write... and I kinda thought as much.
I've seen a pattern in alot of the examples so I assumed there was more then meets the eye..or not.
whatever I learned C++ on my own using only Irrlicht in 6 months AND produced a GUI editor already more advanced then anyone elses so far not only in Irrlicht but the world...
Blow me I tried.
Guest
Post
by Guest » Fri Jun 10, 2005 8:46 am
does exactly the same as:
But in the first case nobody can get the impression that x and y are the same type.
If you're relatively new to C/C++, when you read the second version, you'll probably think that x is also a pointer.