Results 1 to 4 of 4
hello ,
i am trying to compile my first c program and i am getting the errors...... i am using fedora7......program is just to print hello as follow
/* hello.c ...
- 05-30-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 29
[SOLVED] problem compiling c program
hello ,
i am trying to compile my first c program and i am getting the errors...... i am using fedora7......program is just to print hello as follow
/* hello.c */
#include <stdio.h>
int main(int argc,char *argv[])
{
printf(“hello\n”);
return(0);
}
......the error i am getting is
[root@popey include]# gcc hello.c
hello.c: In function ‘main’:
hello.c:5: error: stray ‘\342’ in program
hello.c:5: error: stray ‘\200’ in program
hello.c:5: error: stray ‘\234’ in program
hello.c:5: error: stray ‘\’ in program
hello.c:5: error: ‘hello’ undeclared (first use in this function)
hello.c:5: error: (Each undeclared identifier is reported only once
hello.c:5: error: for each function it appears in.)
hello.c:5: error: expected ‘)’ before ‘n’
hello.c:5: error: stray ‘\342’ in program
hello.c:5: error: stray ‘\200’ in program
hello.c:5: error: stray ‘\235’ in program
plz tell what is the problem......
- 05-30-2008 #2
Post the code of hello.c here.
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 05-30-2008 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 29
solved
quotes with hello were wrong
- 05-30-2008 #4
I was thinking the same. /342 points to single quote and I think you were using two single quotes as Double quote.
Glad to know that you have sorted out problem yourself.
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First


