delorie.com/archives/browse.cgi | search |
Reply-To: | <arfa AT clara DOT net> |
From: | "Arthur" <arfa AT clara DOT net> |
To: | "DJGPP Mailing List" <djgpp AT delorie DOT com>, |
"Dupheraire" <dupheraire AT aol DOT com> | |
Subject: | RE: Linking all my files together? |
Date: | Thu, 1 Oct 1998 16:13:31 +0100 |
Message-ID: | <000501bded4e$0cadf140$124d08c3@arthur> |
MIME-Version: | 1.0 |
X-Priority: | 3 (Normal) |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook 8.5, Build 4.71.2173.0 |
In-Reply-To: | <19980930171354.09201.00004352@ng18.aol.com> |
Importance: | Normal |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
> Just came across another problem that had bugged me when using > this compiler > before. For some reason it is trying to compile and link the two > different > .cpp files together that I have made. 1st program is- > > #include <iostream.h> > void main() > { > cout << "Hello"; > } > > 2nd program is > > #include <iostream.h> > void main() > { > cout << "Please enter the number of gallons you wish to see > the cubic "; > cout << "feet equivalant of."; > float cubicfeet, gallons; > cin >> gallons; > cubicfeet = gallons / 7.481; > cout << "equivalant in cubic feet is " << cubicfeet; > } main() returns int, not void (this is true in C and C++, although C++ is much more specific about it). James Arthur jaa AT arfa DOT clara DOT net ICQ#15054819
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |