Article View: att.lang.c++
Article #286Re: can someone please help with compile error?
From: Craig Richard Sparacino
Date: Sun, 02 Nov 1997 00:00
Date: Sun, 02 Nov 1997 00:00
37 lines
1602 bytes
1602 bytes
<<snip>>
>
>#include <iostream.h>
>int main()
>{
> int x=5;
> int y=7;
> cout "\n"; \\****
> cout <<x+y<<""<<x*y;
> cout "\n"; \\****
> return 0;
>}
I have marked your errors with \\****
you have the code cout "\n"; which is improper. If you look in the line
following that (cout << x+y ...) you will see the insertion characters ( << )
you neglected to use these in the two marked statements.
replace them with
cout << "\n" ;
In fact, you can make those three lines all one line:
cout << "\n" << x+y << " " << x*y << "\n" ;
Notice my use of white space... it makes things so much easier to read.
--Craig
--
To appease those that will doubtlessly complain...
"The views presented above are those of the author and are not
in any way supported or approved of by the University of Delaware;
they are instead, my personal attempt to piss you off"
Technical Details
Message-ID:
<63igkg$73p$1@copland.udel.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<345411F6.8099B23@crystalvision.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114592,639f772a9c997d09 X-Google-Attributes: gid114592,public X-Google-Thread: 109b8e,639f772a9c997d09 X-Google-Attributes: gid109b8e,public X-Google-Thread: 10d4ba,639f772a9c997d09 X-Google-Attributes: gid10d4ba,public From: csparrow@copland.udel.edu (Craig Richard Sparacino) Subject: Re: can someone please help with compile error? Date: 1997/11/02 Message-ID: <63igkg$73p$1@copland.udel.edu> X-Deja-AN: 286612443 References: <345411F6.8099B23@crystalvision.net> Organization: University of Delaware Newsgroups: att.lang.c++,alt.comp.lang.learn.c-c++,microsoft.public.usasalesinfo.developer.visualc++