try writing : using namespace std; after the headers
From: [EMAIL PROTECTED] Reply-To: [email protected] To: [email protected] Subject: [newbie] C++ question Date: Thu, 6 Jan 2005 12:39:51 +0100 (CET)
Hi all, Perhaps this is not the place to ask, but I am getting nowhere searching the web. I am trying to learn C++ programming. At my work (for which I need to learn this) I am futzing with a program which so far works. The machine I use runs on Tru64 Unix. When I try to compile the same program at home, the compiler (I use g++ at home) tells me that all kinds of things are unknown.
The header-files could be the problem, I suspect, but I don't know where or what. Part of the programcode I wrote:
#include <iostream> #include <strstream> #include <fstream> #include <stdlib.h>
// ###############################################################
void VoegToe(char* foto, int hoog, int breed, char* bestand) {
cout << "Toevoegen..." << endl;
ofstream fout(bestand, ios::app); if (!fout) { cout << "Er is iets mis! " << fout << " ??" << endl; return; }
Of course, the code goes on, but the compiler already tells me that "cout" and "endl" are not defined already. Can someone shed some light on this? Have I forgotten to install some devel-packages (I have looked at this but could not find anymore to install.) Or do you need more information?
Thanks for help or pointers, Paul
____________________________________________________ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Join the Club : http://www.mandrakeclub.com ____________________________________________________
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.com/
____________________________________________________ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Join the Club : http://www.mandrakeclub.com ____________________________________________________
