Hi the program is mostly done, i am trying to compile it and thats when i have problems; I only get a blank screen after i run it.
thats the program:
I would like to know whats the problem and how to correct it.
if anyone can post me the results of that program, i would appreciate it.
Thanks for help.
thats the program:
Code:
#include "exo1.h"
#include <iostream>
using namespace std;
#ifndef NONVIRTUELLE_H
#define NONVIRTUELLE_H
class NonVirtuelle {
int x;
public:
void a() const {}
int b() const { return 1; }
};
#endif
#ifndef UNEVIRTUELLE_H
#define UNEVIRTUELLE_H
class UneVirtuelle {
int x;
public:
virtual void a() const {}
int b() const { return 1; }
};
#endif
#ifndef DEUXVIRTUELLES_H
#define DEUXVIRTUELLES_H
class DeuxVirtuelles {
int x;
public:
virtual void a() const {}
virtual int b() const { return 1; }
};
#endif
int main1() {
cout << "La taille d'un entier: " << sizeof(int) << endl;
cout << "La taille de NonVirtuelle: " << sizeof(NonVirtuelle) << endl;
cout << "La taille d'un pointeur void: " << sizeof(void*) << endl;
cout << "La taille de UneVirtuelle: " << sizeof(UneVirtuelle) << endl;
cout << "La taille de DeuxVirtuelles: " << sizeof(DeuxVirtuelles) << endl;
return 0;
}
if anyone can post me the results of that program, i would appreciate it.
Thanks for help.