Code -question

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.
Post Reply
HelloKitty

Code -question

Post by HelloKitty »

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*

Code: Select all

device;

Code: Select all

IrrlichtDevice * device;
and

Code: Select all

IrrlichtDevice *device;
...where the '*' goes.


Thank you so much
HelloKitty

Post by HelloKitty »

Sorry, I screwed up the firsst part. It should be

Code: Select all

IrrlichtDevice* device;
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

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 »

LOL. Thanks for the help.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

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 »

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 »

yes, we publicly spank you Midnight for posting more than you read :lol:

I knew this would come in useful... :twisted:

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 »

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 »

Code: Select all

int x, *y;
does exactly the same as:

Code: Select all

int* y, x;
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.
Post Reply