Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

WTF, is this code not valid?

Name: Anonymous 2006-06-18 2:48

void add_speed_direction (short direction, short addspeed, short& xspeed, short& yspeed) {
    /*This function adds the desired speed to the speed of the entity that calls it, in
    the direction it wants. This function should acquire its variables from the function
    that calls it.  I hope     this is a legal operation within methods.  Maybe it'll be
    easier to make it a method itself? */
    xspeed* += (addspeed*sin(direction));
    yspeed* += (addspeed*cos(direction));
}

For some reason, it doesn't like my pointers and indirection operators.  Microsoft Visual C++ 6.0 gives me this error when I go to compile it:
e:\docs\projects\space story\space story.h(124) : error C2059: syntax error : '+='
e:\docs\projects\space story\space story.h(125) : error C2059: syntax error : '+='

Name: Anonymous 2006-06-20 8:26

>>26
Yeah, I figured that out on my own.  Found out this weird feature where (apparently) typing a namespace name followed by :: give a list of... (I don't know what they're called... identifiers?)  Anyway, endl was in there.  and \n does sound better, so I'll use it.  I can't use namespace std though, because the engine I'm using (This is for a platform game) has it's own namespace, and the trouble of typing out std:: in front of all std stuff is better than typing out the namespace for its identifiers.

So, what reason DOES MSVC++6 suck?  Because right now, my project won't compile in anything else, and it's going to get complicated to make the damn thing compile in VC++2005 for example.  I want to see if it's worth it to change.

Also, for some reason, VC6 doesn't understand null or false either, (gives undeclared indentifier errors on compile)  though it does understand true.  Can this be chalked up to namespace?  I thought false and null were handled by the preprocessor (as in just replaced with 0's and 1's or whatever before even being compiled).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List