Skip to main content
gamedev.net
🔒 Locked

Error...

Started by Drakon 4 replies 350+ views
Original Post
Drakon
Drakon
local function definitions are illegal I dont know what they are or how I''ve fixed them before, but I hate when I get them... what causes them?
"Go for the eyes, Boo, go for the eyes!"
AdmiralBinary
AdmiralBinary
Hehehe...

ILLEGAL:

      
void main()
{
void illegalfunction(); //This is illegal

}


LEGAL:

        
void legalfunction(); //This is legal


void main()
{
}


Hope this helps.

EDIT - N&V beat me...

---------------

I finally got it all together...
...and then forgot where I put it.

Edited by - AdmiralBinary on November 26, 2001 7:07:42 PM

Edited by - AdmiralBinary on November 26, 2001 7:08:21 PM
AdmiralBinary
AdmiralBinary
Could also be caused by forgetting to put a ''}'' at the end of a function.

---------------

I finally got it all together...
...and then forgot where I put it.
Fruny
Fruny
Too bad, dynamic scoping is fun
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Stoffel
Stoffel
  
int f()
{
struct Local
{
static void foo (int a) { /* ...whatever ...*/}
};
Local::foo (10);
}


Edited by - Stoffel on November 26, 2001 8:29:41 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.