Can't simulate this on code warrior help plz!!!!!

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can't simulate this on code warrior help plz!!!!!

ソリューションへジャンプ
2,539件の閲覧回数
A_Al_Shaybani
Contributor I
can any one help to to correct the problem in this code it is simple but i can't run it:smileysad: 
 
 
this is the code:
 
#include <hidef.h>      /* common defines and macros */
#include "derivative.h"      /* derivative-specific definitions */
#pragma LINK_INFO DERIVATIVE "mc9s12dg256"



char Addit( char, char);


void main(void) {
 char x,y,z;
 
 x=5;
 y=6;
 z= Addit (x,y);
 

EnableInterrupts;

  for(; ; ) {}

  char Addit (char a, char b); { 
  return (a+b);
}
 
And im using CodeWarrior for S12(X) Microcontrollers V5.0

Message Edited by A.Al-Shaybani on 2009-10-16 01:44 PM
Message Edited by A.Al-Shaybani on 2009-10-16 01:45 PM
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,493件の閲覧回数
kef
Specialist I
Of course. You should remove extra ;
char Addit (char a, char b);
  return (a+b);
}

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,493件の閲覧回数
A_Al_Shaybani
Contributor I

 

See this is what i got after adding } 

 

ERROR

 

 

0 件の賞賛
返信
1,494件の閲覧回数
kef
Specialist I
Of course. You should remove extra ;
char Addit (char a, char b);
  return (a+b);
}
0 件の賞賛
返信
1,493件の閲覧回数
A_Al_Shaybani
Contributor I
Thank you very much 
0 件の賞賛
返信
1,493件の閲覧回数
kef
Specialist I

Missing }, see below:

 

char Addit( char, char);


void main(void) {
 char x,y,z;
 x=5;
 y=6;
 z= Addit (x,y);

EnableInterrupts;

  for(; ; ) {}
}

char Addit (char a, char b); { 
  return (a+b);
}
0 件の賞賛
返信