Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2360 connectés 

  FORUM HardWare.fr
  Programmation
  C++

  AIDEZ MOI SVP, C'EST TRES IMPORTANT POUR MON GRADUAT

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

AIDEZ MOI SVP, C'EST TRES IMPORTANT POUR MON GRADUAT

n°225820
NathalieCo​m
Posté le 09-10-2002 à 19:05:15  profilanswer
 

Corrigez moi svp !
vous trouverez tous les headers et le main....
aidez moi car même mon prof sait pas....
merci d'avance
 
 
 
 
/////////////// erreurs //////////////////////////////////
 
Deleting intermediate files and output files for project 'main - Win32 Debug'.
--------------------Configuration: main - Win32 Debug--------------------
Compiling...
main.cpp
Linking...
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_detaille(void)" (?put_detaille@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_automatic(void)" (?put_automatic@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_consom_carbur(void)" (?put_consom_carbur@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_acceleration(void)" (?put_acceleration@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_nb_vitesse(void)" (?put_nb_vitesse@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_volume(void)" (?put_volume@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_chevaux(void)" (?put_chevaux@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_puissance(void)" (?put_puissance@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Moteur::put_carburant(void)" (?put_carburant@Moteur@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_remarque_const(void)" (?put_remarque_const@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_n_chassi(void)" (?put_n_chassi@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_ref(void)" (?put_ref@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_marque(void)" (?put_marque@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_detaille_coul(void)" (?put_detaille_coul@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_b(void)" (?put_b@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_g(void)" (?put_g@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_r(void)" (?put_r@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_haute(void)" (?put_haute@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_large(void)" (?put_large@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_longue(void)" (?put_longue@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_materio(void)" (?put_materio@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_d(void)" (?put_d@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_prix(void)" (?put_prix@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_vitess_max(void)" (?put_vitess_max@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_poid(void)" (?put_poid@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_n_serie(void)" (?put_n_serie@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_toit_ouvr(void)" (?put_toit_ouvr@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_cabrio(void)" (?put_cabrio@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_nb_roue(void)" (?put_nb_roue@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_nb_place(void)" (?put_nb_place@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_nb_fenetre(void)" (?put_nb_fenetre@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_nb_porte(void)" (?put_nb_porte@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall Carross::put_genre(void)" (?put_genre@Carross@@QAEXXZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall Moteur::Moteur(void)" (??0Moteur@@QAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: __thiscall Carross::Carross(void)" (??0Carross@@QAE@XZ)
Debug/main.exe : fatal error LNK1120: 35 unresolved externals
Error executing link.exe.
 
main.exe - 36 error(s), 0 warning(s)
 
 
////// mes classes /////////////////////////////////////
 
 
#ifndef _CARROSS_H
#define _CARROSS_H
 
 
 
class Carross
{
         
 
   
   int nb_porte;
  int nb_fenetre;
  int nb_place;
  int nb_roue;
  bool cabrio;
  bool toit_ouvr;
  string genre;
 
  string n_serie;
 
  int poid;
 
  int vitess_max;
 
  double prix;
 
  time_t d;
 
     string materio;
 
      int longue;
  int large;
  int haute;
 
         int r;
         int g;
         int b;
         
   string detaille_coul;
 
   string marque;
   string ref;
   string n_chassi;
   string remarque_const;
 
public :
 
 Carross();
 Carross(int ,int ,int ,int ,int ,bool ,bool , string ,string, int, int , double , time_t , string ,int, int, int ,int ,int ,int ,string , string ,string, string, string );  
 Carross(const Carross& objCaros);
     
 Carross operator +(const Carross & add);  
    Carross operator -(const Carross & sous);  
    int     operator==(const Carross & assin);  
 
 
   
   void put_nb_porte();
  void put_nb_fenetre();
  void put_nb_place();
  void put_nb_roue();
  void put_cabrio();
  void put_toit_ouvr();
  void put_genre();
  void put_n_serie();
  void put_poid();
  void put_vitess_max();
  void put_prix();
  void put_d();
     void put_materio();
      void put_longue();
  void put_large();
  void put_haute();
     void put_r();
     void put_g();
     void put_b();
  void put_detaille_coul();
  void put_marque();
  void put_ref();
  void put_n_chassi();
  void put_remarque_const();
 
        virtual ~Carross(){};
 
};
 
#endif
 
///// implementation /////
 
#include "Carross.h"
using namespace std;
 
Carross::Carross()
{
  nb_porte=0;
  nb_fenetre=0;
  nb_place=0;
  nb_roue=0;
  cabrio=false;
  toit_ouvr=false;
 
   genre = "";
   n_serie = 0;
    poid = 0;
   vitess_max = 0;
   prix = 0.0;
   d = 0;
 
         materio="";
 
   longue=0;
   large=0;
   haute=0;
 
      r=0;
      g=0;
      b=0;
       
   detaille_coul="";
 
           marque="";
   ref="";
   n_chassi=0;
   remarque_const="";
 
 
 
}
 
 
Carross::Carross(int b, int c, int d, int e, bool f, bool g, string a1, string b1, int c1, int d1, double e1, time_t f1, string a2, int b2, int c2, int d2, int e2, int f2, int g2, string h2, string a3, string b3, string c3, string d3)
{
        nb_porte=b;
  nb_fenetre=c;
  nb_place=d;
  nb_roue=e;
  cabrio=f;
  toit_ouvr=g;
 
 
  genre=a1;
  n_serie=b1;
   poid=c1;
  vitess_max=d1;
  prix=e1;
  date=f1;
 
         materio=a2;
 
       longue=b2;
   large=c2;
   haute=d2;
 
      r=e2;
      g=f2;
      b=g2;
       
   detaille_coul=h2;
 
   marque=a3;
   ref=b3;
   n_chassi=c3;
      remarque_const=d3;
 
 
}
 
Carross::Carross(const Carross & objCaros)
 
{
        nb_porte = objCaros.nb_porte;
  nb_fenetre = objCaros.nb_fenetre;
  nb_place = objCaros.nb_place;
  nb_roue = objCaros.nb_roue;
  cabrio = objCaros.cabrio;
  toit_ouvr = objCaros.toit_ouvr;
 
 
  genre = objVeh.genre;
 
  n_serie = objVeh.n_serie;
   poid = objVeh.poid;
  vitess_max = objVeh.vitess_max;
  prix = objVeh.prix;
  d = objVeh.d;
         
  materio = objCara.materio;
 
       longue = objCara.longue;
   large = objCara.large;
   haute = objCara.haute;
 
      r = objCara.r;
      g = objCara.g;
      b = objCara.b;
       
   detaille_coul = objCara.detaille_coul;
 
      marque = objConst.marque;
   ref = objConst.ref;
   n_chassi = objConst.n_chassi;
   remarque_const = objConst.remarque_const;
 
 
 
 
}
 
Carross operator +(const Carross & add)  
 
{
Carross crs;
 
     crs.nb_porte = nb_porte + add.nb_porte;
  crs.nb_fenetre = nb_fenetre + add.nb_fenetre;
  crs.nb_place = nb_place + add.nb_place;
  crs.nb_roue = nb_roue + add.nb_roue;
   
 
  crs.genre = genre + add.genre;
  crs.n_serie = n_serie + add.n_serie;
  crs.poid = poid + add.poid;
  crs.vitess_max = vitess_max + add.vitess_max;
  crs.prix = prix + add.prix;
 
 
        crs.materio = materio + add.materio;
 
      crs.longue = longue + add.longue;
  crs.large = large + add.large;
  crs.haute = haute + add.haute;
 
     crs.r = r + add.r;
     crs.g = g + add.g;
     crs.b = b + add.b;
       
  crs.detaille_coul = detaille_coul + add.detaille_coul;
 
     crs.marque = marque + add.marque;
  crs.ref = ref + add.ref;
  crs.n_chassi = n_chassi + add.n_chassi;
        crs.remarque_const = remarque_const + add.remarque_const;
 
 
return crs;  
}
 
////////////////////////////////////////////////////////////////
 
 
Carross Carross::operator -(const Carross & sous)
 
{
Carross crs_;
 
     crs_.nb_porte = nb_porte - sous.nb_porte;
  crs_.nb_fenetre = nb_fenetre - sous.nb_fenetre;
  crs_.nb_place = nb_place - sous.nb_place;
  crs_.nb_roue = nb_roue - sous.nb_roue;
 
  crs_.poid = poid - sous.poid;
  crs_.vitess_max = vitess_max - sous.vitess_max;
  crs_.prix = prix - sous.prix;
 
       crs_.longue = longue - sous.longue;
   crs_.large = large - sous.large;
   crs_.haute = haute - sous.haute;
 
      crs_.r = r - sous.r;
      crs_.g = g - sous.g;
      crs_.b = b - sous.b;
       
 
   
   
return crs_;  
}
 
////////////////////////////////////////////////////////////////
 
int Carross::operator==(const Carross & assin)
 
{
 if (
        nb_porte == assin.nb_porte &&
  nb_fenetre == assin.nb_fenetre &&
  nb_place == assin.nb_place &&
  nb_roue == assin.nb_roue &&
  cabrio == assin.cabrio &&
  toit_ouvr == assin.toit_ouvr &&
        genre == assin.genre &&
      n_serie == assin.n_serie &&
      poid == assin.poid &&
      vitess_max == assin.vitess_max &&
      prix == assin.prix  
   d == assin.d &&
    materio == assin.materio &&
 
       longue == assin.longue &&
   large == assin.large &&
   haute == assin.haute &&
 
      r == assin.r &&
      g == assin.g &&
      b == assin.b &&
       
   detaille_coul == assin.detaille_coul &&
     
   marque == assin.marque &&
      ref == assin.ref &&
      n_chassi == assin.n_chassi &&
            remarque_const == assin.remarque_const ;
        )
 
return 1;
 else
return 0;
 
}  
 
 
////////////////////////////////////////////////////////////////
 
 
   
  void Carross::put_nb_porte()
  { cin >> nb_porte;
  }
 
  void Carross::put_nb_fenetre()
  { cin >> nb_fenetre;
  }
 
  void Carross::put_nb_place()
  { cin >> nb_place;
  }
 
  void Carross::put_nb_roue()
  { cin >> nb_roue;
  }
 
  void Carross::put_cabrio()
  { cin >> cabrio;
  }
 
  void Carross::put_toit_ouvr()
  { cin >> toit_ouvr;
  }
 
  void Carross::put_genre()
  { cin >> genre;
  }
 
  void Carross::put_n_serie()
  { cin >> n_serie;
  }
 
  void Carross::put_poid()
  { cin >> poid;
  }
 
  void Carross::put_vitess_max()
  { cin >> vitess_max;
  }
 
  void Carross::put_prix()
  { cin >> prix;
  }
 
  void Carross::put_d()
  { cin >> d;
  }
 
     void Carross::put_materio()
  { cin >> materio;
  }
 
      void Carross::put_longue()
  { cin >> longue;
  }
 
  void Carross::put_large()
  { cin >> large;
  }
 
  void Carross::put_haute()
  { cin >> haute;
  }
 
     void Carross::put_r()
  { cin >> r;
   }
 
     void Carross::put_g()
  { cin >> g;
  }
 
     void Carross::put_b()
  { cin >> b;
  }
         
  void Carross::put_detaille_coul()
  { cin >> detaille_coul;
  }
 
  void Carross::put_marque()
  { cin >> marque;
  }
   
  void Carross::put_ref()
  { cin >> ref;
  }
 
  void Carross::put_n_chassi()
  { cin >> n_chassi;
  }
 
  void Carross::put_remarque_const()
  { cin >> remarque_const;
  }
 
 
 
 
 
#ifndef _MOTEUR_H
#define _MOTEUR_H
 
 
class Moteur
{
 
 
 string carburant;
 int puissance;
 int chevaux;
 int volume;
 int nb_vitesse;
 int acceleration;
 int consom_carbur;
 bool automatic;
 string detaille;
 
public :
 
 Moteur();
 Moteur(string ,int ,int ,int ,int ,int ,int ,bool ,string );
 Moteur(const Moteur & objMot);
     
 Moteur operator +(const Moteur & add);  
    Moteur operator -(const Moteur & sous);  
    int    operator==(const Moteur & assin);  
 
 
 
    void put_carburant();
 void put_puissance();
 void put_chevaux();
 void put_volume();
 void put_nb_vitesse();
 void put_acceleration();
 void put_consom_carbur();
 void put_automatic();
 void put_detaille();
 
 virtual ~Moteur(){};
 
};
 
 
#endif  
 
 
#include "Moteur.h"
using namespace std;
 
Moteur::Moteur()
{
 
  carburant="";
  puissance=0;
  chevaux=0;
  volume=0;
  nb_vitesse=0;
  acceleration=0;
  consom_carbur=0;
  automatic=false;
  detaille="";
 
}
 
Moteur::Moteur(string a, int b, int c, int d, int e, int f, int g, bool h, string i)
{
 
  carburant=a;
  puissance=b;
  chevaux=c;
  volume=d;
  nb_vitesse=e;
  acceleration=f;
  consom_carbur=g;
  automatic=h;
  detaille=i;
 
}
 
Moteur::Moteur(const Moteur & objMot)
{
 
  carburant = objMot.carburant;
  puissance = objMot.puissance;
  chevaux = objMot.chevaux;
  volume = objMot.volume;
  nb_vitesse = objMot.nb_vitesse;
  acceleration = objMot.acceleration;
  consom_carbur = objMot.consom_carbur;
  automatic = objMot.automatic;
  detaille = objMot.detaille;
 
}
 
Moteur Moteur::operator +(const Moteur & add)
 
{
Moteur mot;
 
  mot.carburant = carburant + add.carburant;
  mot.puissance = puissance + add.puissance;
  mot.chevaux = chevaux + add.chevaux;
  mot.volume = volume + add.volume;
  mot.nb_vitesse = nb_vitesse + add.nb_vitesse;
  mot.acceleration = acceleration + add.acceleration;
  mot.consom_carbur = consom_carbur + add.consom_carbur;
  mot.detaille = detaille + add.detaille;
 
return mot;
 
}
 
     
////////////////////////////////////////////////////////////////
 
 
 
Moteur Moteur::operator -(const Moteur & sous)
 
 
{
 
Moteur mot_;
 
  mot_.puissance = puissance - sous.puissance;
  mot_.chevaux = chevaux - sous.chevaux;
  mot_.volume = volume - sous.volume;
  mot_.nb_vitesse = nb_vitesse - sous.nb_vitesse;
  mot_.acceleration = acceleration - sous.acceleration;
  mot_.consom_carbur = consom_carbur - sous.consom_carbur;
 
return mot_;
 
}
 
////////////////////////////////////////////////////////////////
     
 
int Moteur::operator ==(const Moteur & assin)  
 
{
 
 if (
        carburant == assin.carburant &&
        puissance == assin.puissance &&
        chevaux == assin.chevaux &&
        volume == assin.volume &&
        nb_vitesse == assin.nb_vitesse &&
        acceleration == assin.acceleration &&
        consom_carbur == assin.consom_carbur &&
        automatic == assin.automatic &&
        detaille == assin.detaille  
         )
 
return 1;
 else
return 0;
 
}
 
 
 
/////////////////////////////////////////////////////////////////
 
 
 void Moteur::put_carburant()
 { cin >> carburant;
 }
 
 void Moteur::put_puissance()
 { cin >> puissance;
 }
 
 void Moteur::put_chevaux()
 { cin >> chevaux;
 }
 
 void Moteur::put_volume()
 { cin >> volume;
 }
 
 void Moteur::put_nb_vitesse()
 { cin >> vitesse;
 }
 
 void Moteur::put_acceleration()
 { cin >> acceleration;
 }
 
 void Moteur::put_consom_carbur()
 { cin >> consom_carbur;
 }
 
 void Moteur::put_automatic()
 { cin >> automatic;
 }
 
 void Moteur::put_detaille()
 { cin >> detaille;
 }
 
 
////////// main /////////////////
 
#include <iostream>
 
using namespace std;
 
#include "Moteur.h"
#include "Carross.h"
 
#include <string>
#include "time.h"
 
 
void main (void)
 
{
 
Carross caros;
Moteur moteur;
 
bool veh_motorise = false ;
 
 
 
cout << " est ce un vehicule motorise ??? True ou False " << endl;
 
 
cin >> veh_motorise ;
 
 
 
  cout << " genre " << endl;
 
  caros.put_genre();
 
     cout << " nombre de portes " << endl;
   
   caros.put_nb_porte();
 
  cout << " nombre de fenetres " << endl;
   
  caros.put_nb_fenetre();
 
  cout << " nombre de places " << endl;
   
  caros.put_nb_place();
 
  cout << " nombre de roues " << endl;
   
  caros.put_nb_roue();
 
  cout << " cabriolet ?? True ou False " << endl;
   
  caros.put_cabrio();
 
  cout << " toit ouvrable ?? True ou False " << endl;
   
  caros.put_toit_ouvr();
 
  cout << " n° de serie " << endl;
   
  caros.put_n_serie();
 
  cout << " poids " << endl;
   
  caros.put_poid();
 
  cout << " vitesse maximum " << endl;
   
  caros.put_vitess_max();
 
  cout << " prix unitaire " << endl;
   
  caros.put_prix();
 
  cout << " date de creation " << endl;
   
  caros.put_d();
 
  cout << " materiaux de la carrosserie " << endl;
     
  caros.put_materio();
 
  cout << " longueur " << endl;
       
  caros.put_longue();
 
  cout << " largeur " << endl;
   
  caros.put_large();
 
  cout << " hauteur " << endl;
   
  caros.put_haute();
 
  cout << " valeur rouge " << endl;
     
  caros.put_r();
 
  cout << " valeur vert " << endl;
     
  caros.put_g();
 
  cout << " valeur bleu " << endl;
     
  caros.put_b();
 
  cout << " detaille couleur " << endl;
   
  caros.put_detaille_coul();
 
  cout << " marque " << endl;
   
  caros.put_marque();
 
  cout << " referance " << endl;
   
  caros.put_ref();
 
  cout << " n° de chassi " << endl;
   
  caros.put_n_chassi();
 
  cout << " remarque du constructeur " << endl;
   
  caros.put_remarque_const();
 
 
if (veh_motorise)
 
{
 
     cout << " carburant " << endl;
   
        moteur.put_carburant();
 
  cout << " puissance en kw " << endl;
   
  moteur.put_puissance();
 
  cout << " nombre de chevaux " << endl;
   
  moteur.put_chevaux();
 
  cout << " volume du moteur " << endl;
   
  moteur.put_volume();
 
  cout << " nombre de vitesses " << endl;
   
  moteur.put_nb_vitesse();
 
  cout << " duree pour atteindre 100 kl/h " << endl;
   
  moteur.put_acceleration();
 
  cout << " consomation du carburant par 100 km " << endl;
   
  moteur.put_consom_carbur();
 
  cout << " vitesse automatique ?? True ou False " << endl;
   
  moteur.put_automatic();
 
  cout << " detaille du moteur " << endl;
   
  moteur.put_detaille();
 
 
 
 
 
}
 
}
 
 
 
 
 
 
 
 
 
 
 
 
 

mood
Publicité
Posté le 09-10-2002 à 19:05:15  profilanswer
 

n°225825
lorill
Posté le 09-10-2002 à 19:11:24  profilanswer
 

1. Tout copier comme ca ca sert a rien
2. Pas la peine de crier
3. Euh
3bis. T'as vraiment mis TOUT ton code dans main.cpp
3ter. Et sinon, pourquoi tu compiles et linke que celui la ?

n°225849
antp
Super Administrateur
Champion des excuses bidons
Posté le 09-10-2002 à 19:51:56  profilanswer
 

ouais
- pas de titre en majuscule
- les balises [code] et [fixed] sont vachement utiles pour le code parce que là c'est pas lisible


---------------
mes programmes ·· les voitures dans les films ·· apprenez à écrire
n°225853
Taz@PPC
saloperie de i=`expr $i + 1`;
Posté le 09-10-2002 à 20:11:30  profilanswer
 

on capte rien, et pas besoin de tout nous donner, cible l'erreur et et soumets la, on est aps la pour lire tout ton code (immonde ta classe, t'a qu'a mettre plus de membres et^presenter encore mieux)


---------------
du bon usage de rand [C] / [C++]
n°225865
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 09-10-2002 à 20:36:35  profilanswer
 

Citation :


Code :
  1. Carross(int ,int ,int ,int ,int ,bool ,bool , string ,string, int, int , double , time_t , string ,int, int, int ,int ,int ,int ,string , string ,string, string, string );



Tu devrais mettre encore plus de paramètres dans ton constructeur... :sarcastic:  
A moins que ce ne soit un examen d'entrée chez Microsoft ? [:ddr555]
 
Blague à part, les LNK2001 sont provoquées par des références externes non trouvées. D'où ma question : compiles tu tes classes et ton main() séparément ? Si oui, tu dois tout compiler en format objet (.o), puis linker tout ça ensemble.
 
Un conseil : change de prof [:ddr555]
 
Je serais gentil avec toi parce que tu débutes, mais ton code est vraiment laid !!


---------------
J'ai un string dans l'array (Paris Hilton)
n°225880
yaisseloul​ou
Elle m'éneeeeeeerve !
Posté le 09-10-2002 à 20:57:04  profilanswer
 

Quelle horreur !

n°225881
yaisseloul​ou
Elle m'éneeeeeeerve !
Posté le 09-10-2002 à 20:57:43  profilanswer
 

Harkonnen a écrit a écrit :

Citation :


Code :
  1. Carross(int ,int ,int ,int ,int ,bool ,bool , string ,string, int, int , double , time_t , string ,int, int, int ,int ,int ,int ,string , string ,string, string, string );



Tu devrais mettre encore plus de paramètres dans ton constructeur... :sarcastic:  
A moins que ce ne soit un examen d'entrée chez Microsoft ? [:ddr555]
 
Blague à part, les LNK2001 sont provoquées par des références externes non trouvées. D'où ma question : compiles tu tes classes et ton main() séparément ? Si oui, tu dois tout compiler en format objet (.o), puis linker tout ça ensemble.
 
Un conseil : change de prof [:ddr555]
 
Je serais gentil avec toi parce que tu débutes, mais ton code est vraiment laid !!




 
C'est le moins qu'on puisse dire !

n°225885
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 09-10-2002 à 20:59:30  profilanswer
 

yaisseloulou a écrit a écrit :

 
 
C'est le moins qu'on puisse dire !




J'ai dit que je serais gentil avec elle ;)


---------------
J'ai un string dans l'array (Paris Hilton)
n°225897
Taz@PPC
saloperie de i=`expr $i + 1`;
Posté le 09-10-2002 à 21:29:57  profilanswer
 

c vrai qu'il est laid ce code...
 
2constructeurs suffisent, l'un par défaut est inutile.
assigne les valeurs des membres à la constructione et non pas par affectation. passe des const std::string & au lieu de copie.
utlise tes constructeurs dans tes opérateurs  
 
vu les spec de ta classe, un attribut public suffit et t'evite d'ecrire 500 fois std::cin (les i/o n'on rien a faire comme méthode).
 
 
c'est pas de la programmation objet


---------------
du bon usage de rand [C] / [C++]
n°226147
NathalieCo​m
Posté le 10-10-2002 à 13:28:57  profilanswer
 

merci à tous

mood
Publicité
Posté le 10-10-2002 à 13:28:57  profilanswer
 

n°226194
darklord
You're welcome
Posté le 10-10-2002 à 14:28:30  profilanswer
 

Harkonnen a écrit a écrit :

A moins que ce ne soit un examen d'entrée chez Microsoft ? [:ddr555]




 
[:ddr555]  [:rofl]


Message édité par darklord le 10-10-2002 à 14:28:41

---------------
Just because you feel good does not make you right

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  AIDEZ MOI SVP, C'EST TRES IMPORTANT POUR MON GRADUAT

 

Sujets relatifs
Aidez moi à ne faire qu'une requête MySQL au lieu de 2!!HELP sur les FRAMES et ONLOAD SVP!!
Aidez moi à finaliser ma requête SQL !!![C] besoin d'aide pour 2 malheureux trucs SVP
[Math.h] Où pourrais je trouver un descriptif très détaillé...DataReport, création d'un groupe... HELP! (Aidez moi SVP...)[Résolu]
SED insertion exemple SVP [ laissez tomber ] merciLa vie très intéressante de MagicBuzz
[Important] Recherche beta-testeurs.[C]Conseillez moi un bon guide pour debutants SVP
Plus de sujets relatifs à : AIDEZ MOI SVP, C'EST TRES IMPORTANT POUR MON GRADUAT


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR