1752806 Members
6510 Online
108789 Solutions
New Discussion юеВ

Re: c under linux

 
SOLVED
Go to solution
Vinayak_HPUX
Frequent Advisor

c under linux

NOT ABLE TO COMPILE simple c program in FC8 linux ??
[root@linuxguru.symantec.com][ /usr/src/redhat/SOURCES ]gcc abc.cc
abc.cc:10: error: stray тАШ\342тАЩ in program
abc.cc:10: error: stray тАШ\200тАЩ in program
abc.cc:10: error: stray тАШ\234тАЩ in program
abc.cc:10: error: stray тАШ\тАЩ in program
abc.cc:10: error: stray тАШ\342тАЩ in program
abc.cc:10: error: stray тАШ\200тАЩ in program
abc.cc:10: error: stray тАШ\235тАЩ in program
abc.cc: In function тАШint main()тАЩ:
abc.cc:10: error: тАШHelloтАЩ was not declared in this scope
abc.cc:10: error: тАШLinuxтАЩ was not declared in this scope
[root@linuxguru.symantec.com][ /usr/src/redhat/SOURCES ]rm abc.c
rm: remove regular file `abc.c'? y
[root@linuxguru.symantec.com][ /usr/src/redhat/SOURCES ]

* hello.c тАУ Canonical тАЬHello, world!тАЭ program 4 4 */
#include
int main(void)
{
fprintf(stdout, тАЬHello, Linux programming world!\nтАЭ);
return 0;
}
gcc is installed but not able to compile c code ..need help?
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
5 REPLIES 5
Torsten.
Acclaimed Contributor
Solution

Re: c under linux

Not sure why you are asking a linux related question in hp-ux land, but if this is your source code - how do you write comments?

/*
not only
*

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Vinayak_HPUX
Frequent Advisor

Re: c under linux

#include
#include
#include
#include
#include
#include
#include
int main(void)
{
fprintf(stdout, ├в Hello, Linux programming world!\n├в );
return 0;
}

have a this code
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Steven Schweda
Honored Contributor

Re: c under linux

Try using simple ASCII quotation marks,
instead of whatever complicated,
good-looking (I'm sure), exotically-coded
junk you have in there.

What are you using as an editor, Microsoft
Word?
Rob Leadbeater
Honored Contributor

Re: c under linux

Hi,

I'll guess that you've cut and pasted some code, and managed to include some invisible control sequences in your source code...

Cheers,

Rob
Vinayak_HPUX
Frequent Advisor

Re: c under linux

ok bye
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "