[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: c++ hello world help



On Thu, May 27, 2004 at 07:09:54AM -0400, Lorenzo Prince wrote:
> Thus spake Kevin Mark:
> # gcc works with C programs.
> # but c++ programs cant find the libs.

and use g++ for c++ it has some extra definitions for where the c++
libraries and headers are located.

> # =====================================================
> # 
> # ~/cpluscplus\% cat page23.cpp 
> # #include <iostream.h>
> # int main() { cout << "Hello, World!\n"; return 0; }
> 
> Try this instead:
> 
> #include <iostream>
> using namespace std;
> int main() { cout << "Hello, World!\n"; return 0; }
> 
> This should solve your problems.
> 
> HTH and HAND,
> PRINCE
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 



Reply to: