Changes between Version 5 and Version 6 of VincentTrial


Ignore:
Timestamp:
May 6, 2005, 12:19:30 PM (19 years ago)
Author:
garonne
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VincentTrial

    v5 v6  
    22
    33by V.Garonne (05.4.2005)
     4
     5== Aim of this document ==
     6The purpose of this little document is to understand and use CMT with simple examples.
    47
    58== CMT install ==
     
    3134cmt src
    3235}}}
     36We see here that a directory tree has been created. We now create and writye our small "C++" program (main.cxx, hello.h and hello.cxx). We have:
     37{{{
     38> more src/hello.h
     39//////////////////////////////////////////////////
     40// author: vincent garonne                      //
     41// date:   4/5/2005                             //
     42// description: hello world description file    //
     43//////////////////////////////////////////////////
    3344
     45#ifndef __HELLO_WORLD__
     46#define __HELLO_WORLD__
     47
     48class hello
     49{
     50    public:
     51        // constructor
     52        hello  () {}
     53       
     54        // desctructor
     55        ~hello (){}
     56
     57        // function example
     58        void print ();
     59};
     60
     61#endif // __HELLO_WORLD__
     62> more src/hello.cxx
     63//////////////////////////////////////////////////
     64// author: vincent garonne                      //
     65// date:   4/5/2005                             //
     66// description: hello world body                //
     67//////////////////////////////////////////////////
     68
     69using namespace std;
     70#include <iostream>
     71
     72#include "hello.h"
     73
     74void hello::print ()
     75{
     76        cout<<"Hello le world !!!"<<endl;
     77}
     78> more src/main.cxx
     79//////////////////////////////////////////////////
     80// author: vincent garonne                      //
     81// date:   4/5/2005                             //
     82// description: main program                    //
     83//////////////////////////////////////////////////
     84#include "hello.h"
     85
     86int main ()
     87{     
     88     hello object;
     89     object.print();
     90     return 0;
     91}
     92
     93}}}