programme et langage c++ david saint-mellion. poste informatique le matériel (hardware) : pc - palm...
TRANSCRIPT
![Page 1: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/1.jpg)
Programme et Langage C++Programme et Langage C++
David Saint-Mellion
![Page 2: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/2.jpg)
Poste informatique
Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone
Matériel
SE
Application
L ’Application ou Programmerépond au besoin de l’utilisateur. Besoin de calcul (tableur) Besoin de produire du texte (traitement de texte)
Constitué de trois Couches
Le SE (Système d’Exploitation) (Noyau temps réel) Linux : Redheat, Suze, Debian - Unix - Windows : 2003, XP, CE - Solaris - PALM_OS
L’Application ou le programme : Excel - Visual Studio - Star Office - TomTom - Mon programme Test.exe
LE SE et l’Applicatif sont des logiciels (Software)
![Page 3: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/3.jpg)
Fabrication d’un produit logiciel
A partir du cahier des charges
La fabrication suit un cycle de développement
Cycle en V
Cycle incrémental
La fabrication du logiciel ou programmation repose sur
l’utilisation d’un langage
les besoins du client sont spécifiés
le logiciel est conçu
les tests sont réaliser pour valider le produit logiciel
le logiciel et fabriqué. C’est la phase de programmation
![Page 4: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/4.jpg)
Les Langages de programmation
• FORTRAN (1957), COBOL (1959), ALGOL, BASIC ,
PASCAL, C
Les langages sont le moyen d’écrire les programmes
Langages algorithmiques ou procéduraux
Langages structurés
Langages orientés scripts
Langages orientés objets
• PERL, PYTHON, JAVA SCRIPT, VB SCRIPT
• C++, ADA, SMALTALK, JAVA, C#
![Page 5: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/5.jpg)
L’outil de développement
L ’outil de développement permet :- d’éditer (écrire) les instructions du programme
Il faut un outil de développement appelé «Compilateur» Ce logiciel permet de programmer - Visual Studio
Les éléments produits et traitées par l’outil sont des fichiers. En C++, ils ont les extensions .cpp,.h,.lib,.exe
- de tester l’exécution grâce à un débuger.
- de fabriquer l’exécutable après les étapes de compilation et d’édition des liens
![Page 6: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/6.jpg)
Produire un EXE en C++
Le Compilateur- à partir du fichier source Test.ccp et des fichiers de définition *.h- produit le fichier Test.obj,
Autres.h
COMPILATEUR
Test.obj
EDITEUR de LIENS
Autres.objFichiers.lib
Test.exe
EDITEUR
Test.cpp Test.h
L’Editeur de liens ou «Linker» - à partir des fichiers *.obj et des fichiers librairies *.libproduit le programme exécutable (fichiers Test.exe)
L’Éditeur produit- le code fichier source -Test.ccp- le fichier de définition Test.h
![Page 7: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/7.jpg)
Portabilité et C++
L’exécutable d’un programme compilé est dédié à un type de machine (cible) (SE + Processeur).
Le source comme Test.cpp est portable. Il faut respecter les standards et choisir l’outil de développement adapté à la cible.
Le Compilateur est choisi en fonction des caractéristiques de la cible.
EDITEUR
Test.cpp Test.h
Matériel 1
SE 1
Matériel 2
SE 2
Test.1.exe
Compilateur 1 Éditeur de
liens 1
Librairie 1
Test.2.exe
Compilateur 2 Éditeur de
liens 2
Librairie 2
![Page 8: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/8.jpg)
Portabilité - 3 familles de langage
Les Programmes Compilés
Les Programmes semis CompilésLes Programmes
Interprétés
Interptr 1 Interptr 2
Cible 1 Cible 2Cible 1 Cible 2Interptr 1 Interptr 2
Cible 1 Cible 2
source
source
Exe 2
Compilo 2
Exe 1
Compilo 1
source
Compilateur
Code Intermédiaire
Ex : C++, C Ex : VB script, JavaScript Ex : Java, C#
![Page 9: Programme et Langage C++ David Saint-Mellion. Poste informatique Le Matériel (Hardware) : PC - Palm - Pocket PC, Robot Pekee, Smartphone Matériel SE Application](https://reader036.vdocuments.fr/reader036/viewer/2022082701/551d9da4497959293b8d4750/html5/thumbnails/9.jpg)
Conclusion Un programme est dédié à
- un besoin- un type de cible (SE+µP)
Le langage C++ est du type objet.
Le langage permet d’écrire un programme
L’outil de développement «Compilateur » permet de fabriquer des programmes
Il est choisi en fonction de la cible et du langage.
Il traite et produit des fichiers
Les fichiers utilisés pour fabriquer un programme ont pour extension :
*.ccp Source C++
*.h Définition
*.obj
*.lib Librairie
*.exe Programme