Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > 2+2 Communities > Other Other Topics
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2005, 05:30 PM
meleader2 meleader2 is offline
Senior Member
 
Join Date: Apr 2005
Location: Women are truly -EV
Posts: 320
Default C error

../userprog/exception.cc: In function `char* UserToSystem(int, int, int)':
../userprog/exception.cc:107: parse error before `)' token
../userprog/exception.cc:107: parse error before `)' token
../userprog/exception.cc:129: parse error before `)' token
../userprog/exception.cc: In function `int SystemToUser(int, int, int, char*)':
../userprog/exception.cc:145: parse error before `)' token
../userprog/exception.cc:145: parse error before `)' token
../userprog/exception.cc:165: parse error before `)' token
../userprog/exception.cc:170: parse error before `)' token



oddly enough the line of code is:

if((numbytes<0) && ((charmode!=M_ASCII) || (charmode!=M_BINARY)))

i doubt i'll get any useful replies but my TA is taking forever so i thought hell i'll give this a whirl. numbytes, charmode is defined in the function declaration and M_ASCII/M_BINARY are #define b4 class starts.
Reply With Quote
  #2  
Old 10-03-2005, 05:31 PM
dtbog dtbog is offline
Junior Member
 
Join Date: Jun 2004
Posts: 19
Default Re: C error

it looks like the error comes before this line.
Reply With Quote
  #3  
Old 10-03-2005, 05:32 PM
diebitter diebitter is offline
Senior Member
 
Join Date: Mar 2005
Posts: 417
Default Re: C error

Yeah, I'm thinking C error, but not in the same way as you, I reckon.
Reply With Quote
  #4  
Old 10-03-2005, 05:34 PM
meleader2 meleader2 is offline
Senior Member
 
Join Date: Apr 2005
Location: Women are truly -EV
Posts: 320
Default Re: C error

[ QUOTE ]
it looks like the error comes before this line.

[/ QUOTE ]


i thought so too, as is usual with these compilers, but everything before it (4 lines) is just declarations of variables...no ( ) whatsoever. and then the function header...this project is due in 5 days. i'm toast.
Reply With Quote
  #5  
Old 10-03-2005, 05:37 PM
dtbog dtbog is offline
Junior Member
 
Join Date: Jun 2004
Posts: 19
Default Re: C error

where are these functions (e.g. UserToSystem) actually being called? look at those lines.
Reply With Quote
  #6  
Old 10-03-2005, 05:37 PM
stinkypete stinkypete is offline
Senior Member
 
Join Date: Jul 2004
Location: Toronto
Posts: 412
Default Re: C error

the error isn't where you think it is. you'd have to post a whole lot more than this for us to tell you. it's probably something that seems totally unrelated to the error messages. like a missing semi-colon at the end of a line. or something.
Reply With Quote
  #7  
Old 10-03-2005, 05:39 PM
meleader2 meleader2 is offline
Senior Member
 
Join Date: Apr 2005
Location: Women are truly -EV
Posts: 320
Default Re: C error

[ QUOTE ]
the error isn't where you think it is. you'd have to post a whole lot more than this for us to tell you. it's probably something that seems totally unrelated to the error messages. like a missing semi-colon at the end of a line. or something.

[/ QUOTE ]

i'm thinking "or something". i don't think a missing semi colon will be missed by the compiler
Reply With Quote
  #8  
Old 10-03-2005, 05:39 PM
meleader2 meleader2 is offline
Senior Member
 
Join Date: Apr 2005
Location: Women are truly -EV
Posts: 320
Default Re: C error

[ QUOTE ]
where are these functions (e.g. UserToSystem) actually being called? look at those lines.

[/ QUOTE ]


it isn't exactly being called yet. i'm using gcc's gmake command...so i'm just linking right now...
Reply With Quote
  #9  
Old 10-03-2005, 05:39 PM
dtbog dtbog is offline
Junior Member
 
Join Date: Jun 2004
Posts: 19
Default Re: C error

[ QUOTE ]

i'm thinking "or something". i don't think a missing semi colon will be missed by the compiler

[/ QUOTE ]

you are mistaken. [img]/images/graemlins/smile.gif[/img]

i've definitely seen it before
Reply With Quote
  #10  
Old 10-03-2005, 05:40 PM
asofel asofel is offline
Senior Member
 
Join Date: Oct 2004
Location: brilliant in my opinion
Posts: 555
Default Re: C error

cut back on the function until its a small amount of text that compiles. add in lines progressively and try to narrow down where the error is...think do this is a binary search type manner and it shouldn't take too long...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.