Hi, I got an error when compiling a C++ file: Host.h:76: error: stray '\240' in program The offending line is simply: static int getTotalHost(); Any ideas? -- -- Verdi March --
On Friday 06 June 2003 14:29, Verdi March wrote:
Hi,
I got an error when compiling a C++ file: Host.h:76: error: stray '\240' in program
The offending line is simply: static int getTotalHost();
Any ideas?
Oh, and also, the following line in Host.cpp, also produced the similar error: int Host::getTotalHost() { -- -- Verdi March --
Verdi March wrote:
I got an error when compiling a C++ file: Host.h:76: error: stray '\240' in program
The offending line is simply: static int getTotalHost();
Any ideas?
I had a similar error a couple of days ago. It was an extraneous hidden character I'd typed by accident. Try deleting all the whitespace in the line and then padding it out with spaces. That shoud clear the \240 character, which probably won't show in the source code. -- JDL Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
On Friday 06 June 2003 14:49, John Lamb wrote:
Verdi March wrote:
I got an error when compiling a C++ file: Host.h:76: error: stray '\240' in program
The offending line is simply: static int getTotalHost();
Any ideas?
I had a similar error a couple of days ago. It was an extraneous hidden character I'd typed by accident. Try deleting all the whitespace in the line and then padding it out with spaces. That shoud clear the \240 character, which probably won't show in the source code.
You're right. Using vi, I saw "int|getHost" instead of "int getHost". Replacing that character with whitespace makes compilation succeed. -- -- Verdi March --
participants (2)
-
John Lamb
-
Verdi March