CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

What do I do wong?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Joris H



Joined: 24 Sep 2003
Posts: 14

View user's profile Send private message

What do I do wong?
PostPosted: Sat Feb 04, 2006 9:02 am     Reply with quote

Recently I upgraded the compiller from 3.202 to 3.242.
now I get different error's when I compill my program
I am stuck with this:
Function defined in .h : void Change_GETAL(int val,int max,int c);
Function: void Change_Getal(int val,int max,int c)
{........}
error:
void select_phone()
{ int temp = 1;
.......
temp= Change_GETAL(temp,2,1);
The last ) is highlighted with the message "a numeric expression must appear here"
it also looks that the different #included files are opened 2x with a error message "function defiition differt from previous definition"
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sat Feb 04, 2006 10:48 am     Reply with quote

In the function prototype you've declared the type and name of the used
parameters and if the function will return a variable or not. (void)

void Change_GETAL(int val,int max,int c);

Then in main you call this function expecting for some return...

temp= Change_GETAL(temp,2,1);

and the compiler point you the mistake:
Quote:

"function definition differt from previous definition"


Conclusion:
The function used must be of the same type declared in functions prototypes.

Humberto
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group