can i use TYPEDEF keywordin the header file as i m using KEIL microvision3 c51 compiler
"can i use TYPEDEF ..."
No, but you can use typedef.
i mean typedef i have used typedef in a header file and included it in my program but its giving error this problem is only with typedef other r ok
"... its giving error ..."
What error?
Additionally, we can't see your code from here.
let us suppose take headerfile.h typedef unsigned int u_int tupedef unsigned char u_char
in the main program #include<reg51.h> #include"headerfile.h" void main() { u_char a; u_int b; ...... } error missing ; before u_char
this is unusal error when i write unsigned int b, or unsigned char a; then its ok n error i think that KEIL didnot support typedef keyword in header file. am i right or wrong??????????????
you is missed the main thing i be thinked yes!!!
typedef unsigned int u_int; typedef unsigned char u_char;
looking to the semicolen you must do for be woking corectley. you will be seeing good working keil compilar for the project yes!!!
Besides the missing semicolons, it would be fun to know the definition of "tupedef".
yes i seeing the tupedef but i be hoping he being mistaked for the speling yes.
i be sometime making mistake with code for the enlgish is verrry difucilt as me but i being get better you be thinking yes?????!!!!!!
"error missing ; before u_char"
You should take the error message seriously. It is a huge hint that you need to terminate your type definitions with a semicolon.
"i think that KEIL didnot support typedef keyword in header file. am i right or wrong?"
Wrong.
"i be sometime making mistake with code for the enlgish is verrry difucilt as me"
People can understand that English is not your native language, and make allowances. But Compilers have no such understanding, and make no such allowances.
The compiler insists that eveyone sticks exactly and precisely to the rules of the 'C' programming language - including things like spelling the keywords correctly, using the correct UPPER/lower case, using the correct punctuation (semicolons, etc), etc, etc...
Hint: to avoid introducing further errors when you post code on the forum, do not manually re-type it - use Copy and Paste instead.
Also, please look at the instructions for posting source code: www.danlhenry.com/.../keil_code.png http://www.keil.com/forum/tips.asp
And remember to check it carefully in the Preview before you press the 'Post' button...
kalib rahib, yes of course there really is no problem in understanding your English. As Andy specified, we are not compilers (at least not me; that was revealed in a rather explicit way a couple of year ago during a job interview: I was given C code fragments to analyze that were samples for PC-Lint. I bombed so now you know for sure that I'm saying the truth :) :) ).