| Problème de compilation par Littlenico |
samedi 11 février 2006 à 10:41:29 |
Configuration: linux mandriva 2006
no newline at end of file
pas de nouvelle ligne à la fin de fichier Que dois je faire ? Affiche ton code s'il n'est pas confidentiel.
|
POUR ENTREESORTIE :
partie spécification : #ifndef _ENTREE_SORTIE_H #define _ENTREE_SORTIE_H #include "chaine.h" //------------------------------------------------------------------------------ // SPECIFICATION DES SOUS-PROGRAMMES DE LECTURE SUR L'ENTREE STANDARD // CHAQUE LECTURE DOIT ETRE VALIDEE PAR L'APPUI SUR LA TOUCHE <ENTREE> //------------------------------------------------------------------------------ // attend l'appui sur la touche <ENTREE> void lire () ; // lit un booleen v // si la valeur lue est 1, le booleen v prend la valeur true // si la valeur lue est 0, le booleen v prend la valeur false // leve l'exception "LECTURE BOOLEEN INCORRECTE" si la saisie est incorrecte void lire (bool & v) throw (Chaine) ; // lit un caractere v // leve l'exception "LECTURE CARACTERE INCORRECTE" si la saisie est incorrecte void lire (char & v) throw (Chaine) ; // lit un entier court v // leve l'exception "LECTURE ENTIER COURT INCORRECTE" si la saisie est // incorrecte void lire (short & v) throw (Chaine) ; // lit un entier court non signe v // leve l'exception "LECTURE ENTIER COURT NON SIGNE INCORRECTE" si la saisie // est incorrecte void lire (unsigned short & v) throw (Chaine) ; // lit un entier v // leve l'exception "LECTURE ENTIER INCORRECTE" si la saisie est incorrecte void lire (int & v) throw (Chaine) ; // lit un entier non signe // leve l'exception "LECTURE ENTIER NON SIGNE INCORRECTE" si la saisie est // incorrecte void lire (unsigned int & v) throw (Chaine) ; // lit un entier long v // leve l'exception "LECTURE ENTIER LONG INCORRECTE" si la saisie est incorrecte void lire (long & v) throw (Chaine) ; // lit un entier long non signe v // leve l'exception "LECTURE ENTIER LONG NON SIGNE INCORRECTE" si la saisie est // incorrecte void lire (unsigned long & v) throw (Chaine) ; // lit un reel v // leve l'exception "LECTURE REEL INCORRECTE" si la saisie est incorrecte void lire (float & v) throw (Chaine) ; // lit un reel double precision v // leve l'exception "LECTURE REEL DOUBLE PRECISION INCORRECTE" si la saisie est // incorrecte void lire (double & v) throw (Chaine) ; // lit une chaine ch sur l'entree standard // leve l'exception "LECTURE CHAINE INCORRECTE" si la saisie est incorrecte void lire (Chaine & ch) throw (Chaine) ; //------------------------------------------------------------------------------ // SPECIFICATION DES SOUS-PROGRAMMES D'ECRITURE SUR LA SORTIE STANDARD // LES IDENTIFICATEURS DE SOUS-PROGRAMMES SE TERMINANT PAR NL POSITIONNENT // LE CURSEUR AU DEBUT DE LA LIGNE SUIVANTE APRES AVOIR EFFECTUE L'ECRITURE //------------------------------------------------------------------------------ // positionne le curseur en debut de ligne suivante void ecrireNL () ; // ecrit un booleen v // si v a pour valeur true, la valeur affichee est egale a 1 // si v a pour valeur false, la valeur affichee est egale a 0 void ecrire (const bool v) ; void ecrireNL (const bool v); // ecrit un caractere v void ecrire (const char v) ; void ecrireNL (const char v) ; // ecrit un entier court v void ecrire (const short v) ; void ecrireNL (const short v) ; // ecrit un entier court non signe v void ecrire (const unsigned short v) ; void ecrireNL (const unsigned short v) ; // ecrit un entier v void ecrire (const int v) ; void ecrireNL (const int v) ; // ecrit un entier non signe v void ecrire (const unsigned int v) ; void ecrireNL (const unsigned int v) ; // ecrit un entier long v void ecrire (const long v) ; void ecrireNL (const long v) ; // ecrit un entier long non signe v void ecrire (const unsigned long v) ; void ecrireNL (const unsigned long v) ; // ecrit un reel v avec nb chiffres apres le point decimal void ecrire (const float v, const int nb) ; void ecrireNL (const float v, const int nb) ; // ecrit un reel double precision v avec nb chiffres apres le point decimal void ecrire (const double v, const int nb) ; void ecrireNL (const double v, const int nb) ; // ecrit une chaine ch sur la sortie standard void ecrire (const Chaine ch) ; // ecrit une chaine ch sur la sortie standard suivie d'un retour a la ligne void ecrireNL (const Chaine ch) ; //------------------------------------------------------------------------------ // SPECIFICATION DES SOUS-PROGRAMMES DE GESTION DE L'AFFICHAGE ECRAN //------------------------------------------------------------------------------ // remet a blanc l'ecran et positionne le curseur en haut a gauche de l'ecran void effacer() ; // positionne l'affichage en mode video inverse void inverser() ; // positionne l'affichage en mode normal void normal () ; // positionne l'affichage en gras void gras () ; // emet un beep sonore void beep () ; // positionne le curseur en ligne l et colonne c void allerLC (const int l, const int c) ; #endif partie implémentation : //------------------------------------------------------------------------------ // IMPORTATION DES BIBLIOTHEQUES UTILISEES //------------------------------------------------------------------------------ #include <iostream> #include <iomanip> #include "entreeSortie.h" using namespace std ; static bool indic = false ; //------------------------------------------------------------------------------ // SOUS-PROGRAMMES //------------------------------------------------------------------------------ void allerLC (const int x, const int y) { cout <<"\033[" <<x <<";" <<y <<"H" <<flush ; } void effacer () { cout <<"\033[H\033[J" <<flush ; } void inverser () { cout <<"\033[7m" <<flush ; } void normal () { cout <<"\033[0m" <<flush ; } void gras () { cout <<"\033[1m" <<flush ; } void beep () { cout <<"\007" <<flush ; } void lire () { char c [255+1] ; cout <<"\ntaper sur ENTREE pour continuer ..." <<endl ; if (indic) { indic = false ; cin.getline (c, 256, '\n') ; } cin.getline (c, 256, '\n') ; } void lire (bool & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE BOOLEEN INCORRECTE") ; } } void lire (char & v) throw (Chaine) { if (indic) { cin >>ws ; } cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE CARACTERE INCORRECTE") ; } } void lire (short & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE ENTIER COURT INCORRECTE") ; } } void lire (unsigned short & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE ENTIER COURT NON SIGNE INCORRECTE") ; } } void lire (int & v) throw (Chaine) { cin >>v ; if (! cin.good ()) { throw uneChaine ("LECTURE ENTIER INCORRECTE") ; } indic = true ; } void lire (unsigned int & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE ENTIER NON SIGNE INCORRECTE") ; } } void lire (long & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE ENTIER LONG INCORRECTE") ; } } void lire (unsigned long & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE ENTIER LONG NON SIGNE INCORRECTE") ; } } void lire (float & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE REEL INCORRECTE") ; } } void lire (double & v) throw (Chaine) { cin >>v ; indic = true ; if (! cin.good ()) { throw uneChaine ("LECTURE REEL DOUBLE PRECISION INCORRECTE") ; } } void lire (Chaine & ch) throw (Chaine) { if (indic) { indic = false ; cin.getline (ch.chaine, 256, '\n') ; } cin.getline (ch.chaine, 256, '\n') ; if (! cin.good ()) { throw uneChaine ("LECTURE CHAINE INCORRECTE") ; } } void ecrire (const bool v) { cout <<v <<flush ; } void ecrireNL (const bool v) { cout <<v <<endl ; } void ecrire (const char v) { cout <<v <<flush ; } void ecrireNL (const char v) { cout <<v <<endl ; } void ecrire (const short v) { cout <<v <<flush ; } void ecrireNL (const short v) { cout <<v <<endl ; } void ecrire (const unsigned short v) { cout <<v <<flush ; } void ecrireNL (const unsigned short v) { cout <<v <<endl ; } void ecrire (const int v) { cout <<v <<flush ; } void ecrireNL (const int v) { cout <<v <<endl ; } void ecrire (const unsigned int v) { cout <<v <<flush ; } void ecrireNL (const unsigned int v) { cout <<v <<endl ; } void ecrire (const long v) { cout <<v <<flush ; } void ecrireNL (const long v) { cout <<v <<endl ; } void ecrire (const unsigned long v) { cout <<v <<flush ; } void ecrireNL (const unsigned long v) { cout <<v <<endl ; } void ecrire (const float v, const int nb) { cout.setf (ios::fixed, ios::floatfield) ; cout <<setprecision (nb) <<v <<flush ; } void ecrireNL (const float v, const int nb) { cout.setf (ios::fixed, ios::floatfield) ; cout <<setprecision (nb) <<v <<endl ; } void ecrire (const double v, const int nb) { cout.setf(ios::fixed, ios::floatfield) ; cout <<setprecision (nb) ; cout <<v <<flush; } void ecrireNL (const double v, const int nb) { cout.setf(ios::fixed, ios::floatfield) ; cout <<setprecision (nb) ; cout <<v <<endl ; } void ecrireNL () { cout <<endl ; } void ecrire (const Chaine ch) { cout <<ch.chaine <<flush ; } void ecrireNL (const Chaine ch) { cout <<ch.chaine <<endl ; } |
Salut,
à mon avis, il suffit de rajouter une ligne vide à la fin de ton fichier et ça devrait suffire. Tu essayes de compiler avec Gcc ou DevC++? A plus
|
| 09/05 23h00 | Où trouver un compilateur C/C++ ? | Langage C |
| 02/06 03h55 | [Pascal] | Pascal |
| 27/02 15h12 | [Linux] Installer les programmes (gestion des paquets, compil) | Linux |
| 18/05 19h58 | [Optimisation] Polymorphisme “statique” | Langage C++ |
| 21/07 11h53 | Comment débuter, quel langage? | Langages |
| 17/06 11h38 | problème compilation | Programmation | 18/06 12h41 | 12 |
| 16/06 19h21 | pb de compilation code C table hachage | Programmation | 23/06 12h40 | 69 |
| 15/06 23h03 | compilation du noyau mandriva 2008.1 | Linux/Unix | 18/06 23h02 | 2 |
| 11/06 14h59 | Logiciel Compilation en C | Programmation | 15/06 15h13 | 11 |
| 06/06 19h26 | Logiciel de compilation d'images | Infographie/Photo | 07/06 21h02 | 6 |
![]() | Compilation Tux & Astux - La compilation Tux et Astux est une compilation de logiciels libres pour Windows. Elle comprend environ 120 logiciels... | Catégorie: Système Licence: Freeware/gratuit |
![]() | Ant Renamer - ANT Renamer permet de renommer un grand nombre de fichiers et dossiers en quelques clics. Il ne fait que modifier les noms... | Catégorie: Gestion de fichiers Licence: Freeware/gratuit |
![]() | Java Runtime Environment - Java Runtime Environment (JRE) installe la machine virtuelle Java, permettant de jouer en ligne, de discuter avec des... | Catégorie: Java Licence: Open Source |
![]() | Nero - Nero 8 est un logiciel de gravure payant, présenté ici dans sa version de démonstration. Il s'agit néanmoins d'un logiciel... | Catégorie: Gravure Licence: Demo |