Bonjour, tout d abord, je suis etudiant et je travail sous anjuta. je veux refaire un programme avec dev c++ (j ai pas linux chez moi), et la compilation ne marche pas.... aidez moi svp ;)
voila mon pgm :
#include <iostream>
#include <string.h>
#include <conio.h>
#define MAX_TB 200
#define NBR_CHAMP_MAX 8
using namespace std;
class tPageweb
{
private :
char TableParams[MAX_TB];
int TableLongNom[NBR_CHAMP_MAX];
int TableDebutNom[NBR_CHAMP_MAX];
int TableDebutValeur[NBR_CHAMP_MAX];
int TableLongValeur[NBR_CHAMP_MAX];
int NombreChamp;
public :
void Initialize(char* chaine);
void Afficher();
bool DecomposerChaine();
char* LireNom(int Numnom,char* Nom);
char* LireValeur(int Numchamp, char* Valeur);
int LireNbrChamp();
}
/*********************************************************************************
*
* Initialize
*
**********************************************************************************/
void tPageweb::Initialize(char* chaine)
{
int b = strlen(*chaine);
if (b <= MAX_TB)
strcpy(TableParams,*chaine);
}
/*********************************************************************************
*
* Affichage
*
**********************************************************************************/
void tPageweb::Afficher()
{
int i = 0;
char chaine1;
char chaine2;
while(i < NombreChamp)
{
cout<<LireNom(i,&chaine1)<<"a pour valeur : "<<
LireValeur(i, &chaine2)<<endl;
cout<<"___________________________________________________________"<<endl;
}
getch ();
}
/*********************************************************************************
*
* Decomposition
*
**********************************************************************************/
bool tPageweb::DecomposerChaine()
{
/*************************************************************************
* Nombre de champs, debut nom et valeur
**************************************************************************/
int i = 0;
int j = 1;
int k = 0;
TableDebutNom[0] = 0;
NombreChamp = 1;
while (TableParams[i] != '\0')
{
if (TableParams[i] == '&')
{
TableDebutNom[j] = i;
j++;
}
if (TableParams[i] == '=')
{
NombreChamp++;
TableDebutValeur[i] = k;
k++;
}
i++;
}
}
int main()
{
char Machaine[MAX_TB] = "Nom=MonNom&Prenom=Moprenom&Age=MonAge";
tPageweb MaPage;
printf("<html><body>%s</body></hmtl>\n",Machaine);
MaPage.DecomposerChaine();
MaPage.Afficher();
getch();
return 0;
}
voila, il est assez simple, mais bon...je comprends pas :'(
merci d avance pour l aide


