   "-" thing. What does it really do?
  This is a noobish question. That is why I am posting in the beginner forum.Take this snippet of code for example:g_pd3dDevice -> Clear(/*parameters*/);What exactly does the -> do. Here is my guess, it transfers the value/data from Clear(); to the variable g_pd3dDevice.Am I right?[Edited by - vrok137 on December 10, 2005 11:15:52 PM]
  Assuming you know about pointers, in that snippet it's calling Clear from the variable that the left hand side(g_pd3dDevice) is pointing to. It is shorthand of doing this: (*g_pd3dDevice).Clear();   ;  The expression a->b is equivalent to the expression (*a).b; that is, it dereferences a pointer to an object, then accesses a member of the object.EDIT: BTW, I just noticed that you're offering C++ tutorials on your site. I think that at this point in your development as a programmer, that may be overly presumptive.   ;  It does the same thing to a pointer to a struct as . does to the struct itselfEDIT (way too late...)Quote:BTW, I just noticed that you're offering C++ tutorials on your site. I think that at this point in your development as a programmer, that may be overly presumptive.That said... I think it looks like a nice initiative. Nice design =)   ;  when you're addressing a member of a struct/class, you use object.namespace::member/methodOR more commonly, justobject.member/methodwhen you're addressing a reference to a struct/class, you use the -> operatorobject->namespace::member/methodorobject->member/methodit's like pie   ;Quote:Original post by SneftelEDIT: BTW, I just noticed that you're offering C++ tutorials on your site. I think that at this point in your development as a programmer, that may be overly presumptive.I was just thinking the same thing.   ;Quote:From your site:A: Creating C++ programs on an Apple computer is a lot like making scrambled eggs in your microwave. It is somewhat possible, but it is not very efficient and you might end up with a big mess to clean up. C++ was primaraliy developed for operating systems other than Macintosh.Maybe there's something I don't know here, but compiler- and platform-specific details aside, I never got the impression that C or C++ were tied to any particular OS. I do game programming on a Mac every day, and have yet to encounter the 'scrambled egg' situation you describe.I bring this up only because your statements might discourage aspiring programmers from developing for the Mac, or perhaps steer them away from cross-platform programming in general. Unless you can back the above statements up somehow, I think it's a little irresponsible to include them in your FAQ.   ;  i make scrammbled eggs in my microwave all the time....and i have never had a problem :P   ;  I concur with jyk -- I use a mac everyday in my development.   ;Quote:Original post by jykQuote:From your site:A: Creating C++ programs on an Apple computer is a lot like making scrambled eggs in your microwave. It is somewhat possible, but it is not very efficient and you might end up with a big mess to clean up. C++ was primaraliy developed for operating systems other than Macintosh.Maybe there's something I don't know here, but compiler- and platform-specific details aside, I never got the impression that C or C++ were tied to any particular OS. I do game programming on a Mac every day, and have yet to encounter the 'scrambled egg' situation you describe.I bring this up only because your statements might discourage aspiring programmers from developing for the Mac, or perhaps steer them away from cross-platform programming in general. Unless you can back the above statements up somehow, I think it's a little irresponsible to include them in your FAQ.I sent him a PM about that a few hours before you posted this.  He hasn't read it at the time of this post, though (I was going to post it here, but it seemed a bit off topic [smile]).   