OT: C++ Question, solved

Karl F. Larsen klarsen1 at gmail.com
Thu Mar 12 23:58:53 UTC 2009

Owen Townend wrote:
> 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.
    I will try to do that but the darn mail system seems to screw up 
other parts. I am thinking perhaps a source code should be sent as a 
file attached to the message. Can you do that. I will try...I have 
attached "ex78.cc" so see if you can play with that. It works :-)



	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
   PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex78.cc
Type: text/x-c++src
Size: 1590 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090312/ede68da0/attachment.cc>

More information about the ubuntu-users mailing list