Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[Linker error] undefined reference to

Name: Aku 2009-01-03 15:51

#ifndef RPKEIK_H
#define RPKEIK_H

#include <cstdlib>
#include <iostream>
#include <string>


//using namespace std ;

class RPKeik
{
    public :
    RPKeik() ;
    ~RPKeik() ;
    void ChoixJoueur1() ;
    void ChoixJoueur2() ;
    void Combat() ;
   
    private :
    int Joueur1 ;
    int Joueur2 ;
   
    string NomJoueur1 ;
    int VieJoueur1 ;
    int AttaqueJoueur1 ;
    string NomAttaque1Joueur1 ;
    int Attaque1Joueur1 ;
    string NomAttaque2Joueur1 ;
    int Attaque2Joueur1 ;
   
    string NomJoueur2 ;
    int VieJoueur2 ;
    int AttaqueJoueur2 ;
    string NomAttaque1Joueur2 ;
    int Attaque1Joueur2 ;
    string NomAttaque2Joueur2 ;
    int Attaque2Joueur2 ;
} ;

RPKeik Joueur12 ;

void RPKeik::ChoixJoueur1()
{
    cin >> Joueur1 ;
    switch (Joueur1)
    {
           case 1 : this->NomJoueur1="Sorel" ;
                    this->NomAttaque1Joueur1="1, 2, 3 Sorel" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Sorel & Hardy" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 2 : this->NomJoueur1="Pikachu" ;
                    this->NomAttaque1Joueur1="Tonnerre" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Vive-Attaque" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 3 : this->NomJoueur1="Vegeta" ;
                    this->NomAttaque1Joueur1="Final Flash" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="It's over 9000 !!!" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 4 : this->NomJoueur1="Mario" ;
                    this->NomAttaque1Joueur1="Saut" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Marteau" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 5 : this->NomJoueur1="Ryu" ;
                    this->NomAttaque1Joueur1="Hado Ken" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Sho Ryu Ken" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 6 : this->NomJoueur1="Captain Falcon" ;
                    this->NomAttaque1Joueur1="Falcon Punch" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Falcon Kick" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 7 : this->NomJoueur1="Dark_Vador" ;
                    this->NomAttaque1Joueur1="Je suis ton père" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Sabre Laser" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 8 : this->NomJoueur1="Windows" ;
                    this->NomAttaque1Joueur1="BSOD" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Bug" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 9 : this->NomJoueur1="Joker" ;
                    this->NomAttaque1Joueur1="Pencil Trick" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="Why so serious ?" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           case 10 : this->NomJoueur1="Leonidas" ;
                    this->NomAttaque1Joueur1="This is Sparta !" ;
                    this->Attaque1Joueur1=50 ;
                    this->NomAttaque2Joueur1="We dine on hell !" ;
                    this->Attaque2Joueur1=60 ;
           break ;
           default : cout << "Veuillez selectionner un personnage existant !" << endl ;
           break ;
    }


void RPKeik::ChoixJoueur2()
{
    cin >> Joueur2 ;
    switch (Joueur2)
    {
           case 1 : this->NomJoueur2="Sorel" ;
                    this->NomAttaque1Joueur2="1, 2, 3 Sorel" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Sorel & Hardy" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 2 : this->NomJoueur2="Pikachu" ;
                    this->NomAttaque1Joueur2="Tonnerre" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Vive-Attaque" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 3 : this->NomJoueur2="Vegeta" ;
                    this->NomAttaque1Joueur2="Final Flash" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="It's over 9000 !!!" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 4 : this->NomJoueur2="Mario" ;
                    this->NomAttaque1Joueur2="Saut" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Marteau" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 5 : this->NomJoueur2="Ryu" ;
                    this->NomAttaque1Joueur2="Hado Ken" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Sho Ryu Ken" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 6 : this->NomJoueur2="Captain Falcon" ;
                    this->NomAttaque1Joueur1="Falcon Punch" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Falcon Kick" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 7 : this->NomJoueur2="Dark_Vador" ;
                    this->NomAttaque1Joueur2="Je suis ton père" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Sabre Laser" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 8 : this->NomJoueur2="Windows" ;
                    this->NomAttaque1Joueur2="BSOD" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Bug" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 9 : this->NomJoueur2="Joker" ;
                    this->NomAttaque1Joueur2="Pencil Trick" ;
                    this->Attaque1Joueur2=50 ;
                    this->NomAttaque2Joueur2="Why so serious ?" ;
                    this->Attaque2Joueur2=60 ;
           break ;
           case 10 : this->NomJoueur2="Leonidas" ;
                     this->NomAttaque1Joueur2="This is Sparta !" ;
                     this->Attaque1Joueur2=50 ;
                     this->NomAttaque2Joueur2="We dine on hell !" ;
                     this->Attaque2Joueur2=60 ;
           break ;
           default : cout << "Veuillez selectionner un personnage existant !" << endl ;
           break ;
    }
}

void RPKeik::Combat()
{
     do
     {
         cout << "Joueur1 : " << NomJoueur1 << "choisissez une attaque : " << endl << "1." << NomAttaque1Joueur1 << endl << "2." << NomAttaque2Joueur1 << endl ;
         cin >> this->AttaqueJoueur1 ;
         switch (this->AttaqueJoueur1)
         {
                case 1 : cout << NomJoueur1 << " lance " << NomAttaque1Joueur1 << endl ;
                         this->VieJoueur2 = this->VieJoueur2 - this->Attaque1Joueur1 ;                    
                break ;
                case 2 : cout << NomJoueur1 << " lance " << NomAttaque2Joueur1 << endl ;
                         this->VieJoueur2 = this->VieJoueur2 - this->Attaque2Joueur1 ;
                break ;
         }
         cout << NomJoueur2 << " a " << this->VieJoueur2 << " de vie " << endl << endl ;
        
         if (this->VieJoueur2 != 0)
         {
             cout << "Joueur2 : " << NomJoueur2 << "choisissez une attaque : " << endl << "1." << NomAttaque1Joueur2 << endl << "2." << NomAttaque2Joueur2 << endl ;
             cin >> this->AttaqueJoueur2 ;
             switch (this->AttaqueJoueur2)
             {
                    case 1 : cout << NomJoueur2 << " lance " << NomAttaque1Joueur2 << endl ;
                             this->VieJoueur1 = this->VieJoueur1 - this->Attaque1Joueur2 ;                     
                    break ;
                    case 2 : cout << NomJoueur2 << " lance " << NomAttaque2Joueur2 << endl ;
                             this->VieJoueur1 = this->VieJoueur1 - this->Attaque2Joueur2 ;
                    break ;
             }
             cout << NomJoueur1 << " a " << this->VieJoueur1 << " de vie " << endl ;
         }
     }
     while (!(this->VieJoueur1 == 0 || this->VieJoueur2 == 0)) ;
    
     if ( this->VieJoueur2 <= 0 )
     {
          cout << "Joueur 1 a gagné !" << endl ;
     }
     else
     {
         cout << "Joueur 2 a gagné !" << endl ;
     }
}

#endif

--------



Errors :
  [Linker error] undefined reference to `RPKeik::RPKeik()'
  [Linker error] undefined reference to `RPKeik::~RPKeik()'

What can I do to fix this ?

Name: Anonymous 2009-01-05 10:35

Is /prog/ getting even slower?

Name: Anonymous 2009-01-05 10:48

>>41
No, your getting faster

Name: Anonymous 2009-01-05 11:03

What about my faster?

Name: Anonymous 2009-01-05 11:31

>>43
youre getting one

Name: Anonymous 2009-01-05 12:10

>>36
BR?  JAJAJAJA DE DONDE EROSU!!!!!

Name: Trollbot9000 2009-07-01 9:43

Attaque2joueur1=60.

Name: Anonymous 2011-02-03 0:40

Name: Anonymous 2013-01-19 23:49

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Name: Anonymous 2013-09-01 20:57




          r‐- 、                    /
         、.  _|___/ ̄`ヽ            /      い
   ',  /`ヽ_,X´ |-、/   ̄`ヽノ             |   か  い
       |   _r‐< ̄>ー-、.イ__ \        __|.   し  の
    ',  /「,>''"´/`ヽー-く⌒l_`ヽヽ     /   \   ら
 \  ', lア´  /./      \-'ヽ. ハ   ./   私    ?
 .  \  /   メ、|   ,ハ    ヽ/、  |   |    の   ト-----
    ∠!   ./rト八  l/ -|‐ ハ  |,ハ/ |    |    土   |
 ‐ ─  、  /|  j_r!\| -rァテ、|  ト、| /   |    下   |
    / \.ハ"  ,    j__rソ,  /.) Yl   <. 見. 座.  |
 //   ./ 人  、_   "//|  八    | た. を   |
     /   ,' .| r|>、__ ,,. イ /ヽ| ハ  ヽ   | 時      |   ____
   /   .| ∨/::::::/ |__,. イレ' r' \ |  )  、        ´       `ヽ
     .r-'∨.,':::i::::|_/\  rソ/:::::::::Y ∧   ` ー---‐/      最
      ∨  |::/::::(/ム)ヽrノ:::i::::::::::::::∨  \  /L  /      謝.  終
      | r/、!:::::::く人):::::::::/:::::::::::::::::|     ヽ/_/  |  貴   る   的
      ,ハ /ヽ,ヘ、::::::::l:::::::::::::ヽ_r- 、__ノ ヽ、 く_」    |  方   事  に
     ( ./  ヽ,ハー::::::::::::::::イ|  ̄ |   ',   |.     |  達   に
      ノ7  //rく::::r-、:::::::::::::;| _  |    |  /     |  な   .な
     |./  ./_,.へ.  ,.ヘ. ̄ /´   ,ハ_   } ̄`Y´{  |  の  る
     ,'  /::::::::::::::::Y::::::::ヽ/   / ∧`ヽノレ' ハ」  |  よ.   の
   r/|  'J::::::::::::::::/:::::::::::/  ,イ_/|:::::ヾ]_)ハ   /   |   :  .は
   く∧__j:::::::::::::::::;'::::::::::::(|  _ノ:::::::::,':::::::::/」 |/     |   :
     |:::::::::::::::::::::::::::::::::::::::し'::::::::::::/:;'::/´        '、 ?
     ヽ:;____、:::::::::::::::::::::::::::/::/´             \
             ̄`ヽ:;____/               ̄ ̄ ̄

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List