🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: att.lang.c++
Article #93

Re: This bit of code won't compile

#93
From: Sebastien Emery
Date: Wed, 24 May 2000 00:00
33 lines
1685 bytes
You need to put cout on each line if you have a   ;  at the end of your
first line. Or remove the   ; at the end of your line. Is the same to put
everything in the same line.

I hope that help you;
Sebastien

Sidey wrote in message <8g1jac$6u3$1@plutonium.btinternet.com>...
>
>   This is a listing from C++: An interactive course. This bit of code is
an
>exact copy of the listing but it won't compile.
>I'm using MS Visual C++ 6 introductary edition.
>
>thanx in advance,
>                                   Richard
>
>
> void display()
> {
>        cout << hours << ":";               // hours and colon
>               << setfill('0');                    // fill character is '0'
>               << setw(2) << minutes;    // minutes is 2 chars wide
> }
>
>E:\Cpp\Projects\Interactive Course\Listing2_4\Source\Main.cpp(24) : error
>C2143: syntax error : missing ';' before '<<'
>E:\Cpp\Projects\Interactive Course\Listing2_4\Source\Main.cpp(25) : error
>C2143: syntax error : missing ';' before '<<'
>
>
>
>
Technical Details
Message-ID: <YkPW4.2703$y4.185792@wagner.videotron.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8g1jac$6u3$1@plutonium.btinternet.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d4ba,42c8c216287fdf5e,start
X-Google-Attributes: gid10d4ba,public
From: "Sebastien Emery" <emery.univer.cours@videotron.ca>
Subject: Re: This bit of code won't compile
Date: 2000/05/24
Message-ID: <YkPW4.2703$y4.185792@wagner.videotron.net>
X-Deja-AN: 626687398
References: <8g1jac$6u3$1@plutonium.btinternet.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
X-Complaints-To: abuse@videotron.net
X-Trace: wagner.videotron.net 959168952 24.200.6.228 (Wed, 24 May 2000 07:49:12 EDT)
NNTP-Posting-Date: Wed, 24 May 2000 07:49:12 EDT
Newsgroups: att.lang.c++