OT: C++ Question, solved
Owen Townend
owen.townend at gmail.com
Thu Mar 12 22:55:41 UTC 2009
2009/3/13 H.S. <hs.samix at gmail.com>:
> Karl F. Larsen wrote:
>> Hi and thanks for your work. I will use .cc from now on, if the joe
>> editor will do color with that. The color helps me.
>
> You are welcome. There are many editors which provide syntac
> highlighting. I have not used joe editor, but if it syntax highlights C,
> it most probably syntax highlights C++ as well.
>
>>
>> I fixed the source code by erasing the entire line:
>> cin>>feet>>inches;
>> and then retyping it in.
>
> My point was the the compiler error message you have earlier could not
> have been right with the source you gave along with it.
>
>
[snip]
[add quote from earlier]
> Moreover, your example you gave about does not compile anyway. I get:
> $> g++ -Wall foo.c -o foo
> foo.c: In function ‘int main()’:
> foo.c:19: error: ‘line’ was not declared in this scope
> foo.c:19: error: expected `)' before numeric constant
This error is from the '(line 24)' comment Karl added to point at the
line g++ was complaining about.
Karl: If/when you ask a question like this try adding your code
comments (such as the one above) as valid c++ comments so that people
trying to help get the same error when copy/paste/compiling your code.
cheers,
Owen.
More information about the ubuntu-users
mailing list