-
25
pages
-
English
-
Documents
Description
CoursdeC++IntroductionCécile Braunsteincecile.braunstein@lip6.frCours de C++ 1 / 20GénéralitéNotes• Interros cours 1/3• Contrôle TP 1/3• Mini projet 1/3• Bonus (Note de Participation) jusqu’à 2 pointsRéférences• H. GARRETA, Le langage et la bibliothèque C++, ellipses 2000• A. KOENIG, B. MOO, Accelerated C++, Addison Wesley 2006• http://www.cplusplus.com• http://www.google.com• http://www.cppreference.comCours de C++ 2 / 20WhyC++?C++• Middle level language• Developed by Bjarne Stroustrup in 1979 at Bell Labs• First view as an extension of C (C with classes)Philosophy• C++ is designed to be a statically typed, general purposelanguage that is as efficient and portable as C• C++ is designed to give the programmer choice, even if thismakes it possible for the programmer to choose incorrectly• C++ is object language it implies :• Re use• Modularity• MaintainabilityCours de C++ 3 / 20Helloworld!helloworld.cpp// The first programm#include int main(){std::cout << "Hello, world !" << std::endl ;return 0;} Cours de C++ 4 / 20Callthecompilerg++ -Wall -g helloworld.cpp -o hello Compile Optionsg++ accepts most options as gcc• Wall : all warnings• g : include debug code• o : specify the outfile name (a.out by default)Cours de C++ 5 / 206Programdetails#includeMany fundamentals facilities are part of standard library rather thancore language#include #include directive + angle brackets refers to ...
-
Publié par
-
Langue
English