is not a class or a namespace alors qu'il est déclarer
	
	
		Le compilateur m'insulte en me disant:
I:\C++\Projects\SDL\Gifts Rush\mainNiveaux.cpp||In function `int niveau(int, SDL_Surface*)':|
I:\C++\Projects\SDL\Gifts Rush\mainNiveaux.cpp|43|error: `charger' is not a class or namespace|
I:\C++\Projects\SDL\Gifts Rush\mainNiveaux.cpp|43|error: invalid conversion from `SDL_Surface*' to `int'|
I:\C++\Projects\SDL\Gifts Rush\mainNiveaux.cpp|43|error:   initializing argument 1 of `int niveau(int, SDL_Surface*)'|
I:\C++\Projects\SDL\Gifts Rush\mainNiveaux.cpp|43|error: invalid conversion from `int' to `SDL_Surface*'|
I:\C++\Projects\SDL\Gifts Rush\mainNiveaux.cpp|43|error:   initializing argument 2 of `int niveau(int, SDL_Surface*)'|
||=== Build finished: 5 errors, 0 warnings ===|
Mais je ne vois pas ce qui a de mauvais...
pouriez-vous voir ce qui ne va pas?
	Code:
	
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 
 |     int niveau(int niveauActu, SDL_Surface *ecran)
    {
        int continuer = niveauActu;
        Niveaux charger;
 
        do
        {
        continuer = charger::niveau(ecran, niveauActu);
        }
        while(continuer != 0 || continuer != 11);
        return -1;
    } | 
 Déclaration de la classe:
	Code:
	
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 
 | #ifndef DEF_CURSEUR
#define DEF_CURSEUR
 
#include <iostream>
#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <FMOD/fmod.h>
 
#define PX_PAR_FRAME 10
#define VITESSE_MINIMAL 50
#define VITESSE_MAXIMAL 30
 
int niveau(int niveauActu, SDL_Surface *ecran);
 
class Niveaux
{
    public:
 
    Niveaux::Niveaux();
    int niveau(SDL_Surface *ecran, int niveauActu);
 
    ~Niveaux();
 
 
    private:
 
    void comptePoint();
    bool quitter(SDL_Surface *fond, SDL_Surface *ecran);
    void pause(SDL_Surface *fond, SDL_Surface *ecran);
    void initialisation(int niveauActu);
 
    bool statutMusique;
 
    int niveauActu;
    long timer;
    char *niveauCases [5][50];
 
    SDL_Color noir;
 
    SDL_Surface *ecran;
    SDL_Surface *pereNoel;
 
    SDL_Event event;
 
    FSOUND_STREAM *musiqueNiveau;
 
};
 
#endif |