[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] C++/Hello, World!



On Friday 15 November 2002 16:06,  Carsten Svaneborg wrote:
....
> g++ Hello.cpp -o hello
> ./hello
>
> burde virke. 

Det gør det også:

sslug@sslug:~> g++ Hello.cpp -o hello
sslug@sslug:~> ./hello
Hello, World! I am 8 Today!


> Glemmer du -o hello kompileres programmet til filen
> a.out, som du så kan køre.

Virker også:

sslug@sslug:~> g++ Hello.cpp
sslug@sslug:~> ./a.out
Hello, World! I am 8 Today!
......
> Denne fejl kommer fordi shell forsøger at fortolke din C++ program
> som et shellscript. Hvis du vil lave et hello world shell script
> så skal du istedet skrive:
>
> hello.sh
> echo "Hello World"
>
> Du kan så køre det med ./hello.sh
> (evt. efter chmod +x hello.sh for at mærke det som executable)

OK - så er jeg med (igen)! Tak for hurtig hjælp!

mvh
Hans



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *