#include "membre.h"
#include <iostream>
using namespace std;
membre::membre()
{
this->m=50;
}
void membre::toString(){
cout<<"Le nombre contenu dans l'objet est : "<<this->m<<endl;
}
//--------------------------------------------------------------------------------------------------------------------
#ifndef MEMBRE_H
#define MEMBRE_H
class membre
{
public:
membre();
int m;
void toString();
};
#endif // MEMBRE_H
//--------------------------------------------------------------------------------------------------------------------
//Auteur : Raphael De Oliveira
#include <iostream>
#include "test.h"
#include "membre.h"
int main() {
membre m1;
m1.toString();
return 0;
}
Add a code snippet to your website: www.paste.org