[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] Kan ikke starte C++!!!



Det gør man ikke!!! (att. Martin Skøtt)

Brug din favoriteditor til at lave en *.cc ! fil EX(for eksempel): Hello.cc - A Modern Greeting Program

// -*- C++ -*- eksempel fil  // MUST BE FIRST LINE OF FILE: emacs magic
// C++ source file (i.e. cc-file)
// Hello.cc                            // merly notional

#include <ostream.h>           /* // using old-style streams */


// Modern greeting program
// main program entry point:

int main() {                               // C++ is very explicit about return types
    cout << "Hello World!\n";    // traditional greeting would be "hello world"
    return 0;                               // Good C++ programming style
}

/* Hello.cc */ // LAST LINE OF EXAMPLE

efter have gemt eksemplet som Hello.cc
kompileres det fra en komandolinie med:
g++ -o Hello Hello.cc
(både programnavnet g++ (som kalder gcc på C++ facon) og efternavnet .cc er nødvendige for at gcc per automatik inkluderer de
nødvendige bibloteker).

Har du stadig problemer med at komme i kontakt med g++/gcc så kontakt mig og jeg lægger koden op på min hjemmeside/mailer den
direkte.

Med venlig hilsen
sslug@sslug
http::/home12/inet.tele.dk/ngr

Nils Åke Ljunggren

Martin Skøtt skrev:

> On Mon, 12 Apr 1999 09:46:17 +0200, Thomas L. Jørgensen <sslug@sslug> wrote:
> >Ok.
> >Men hvad skriver man så for at komme ind i et program/en prompt hvor man kan skrive, gemme osv. sine C++ programmer/filer???
> Det gør man ikke. Man skriver sine programmer i sin favorit editor (ed, vi,
> emacs eller hvad du nu vil). Når nu du har lavet dit program så laver du en
> gcc -o <exenavn> <program.c>
> Nu skulle koden i programc gerne blive compileret og linket til programmet
> exenavn som du så kan køre.
>
> --
> Med venlig hilsen
> Martin Skøtt
> sslug@sslug





 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 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] *