c++

Hi the program is mostly done, i am trying to compile it and thats when i have problems. I am using Xcode(mac). I just want to know if the code is good, bcoz even if there is no errors, I only have a blanc screen after i run it.
thats the program:

#include <iostream>
using namespace std;


class NonVirtuelle {
int x;
public:
void a() const {}
int b() const { return 1; }
};



class UneVirtuelle {
int x;
public:
virtual void a() const {}
int b() const { return 1; }
};

class DeuxVirtuelles {
int x;
public:
virtual void a() const {}
virtual int b() const { return 1; }
};


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;
}
The entry point in C++ is the main function, in your code you have main1. Try to remove that '1'
I did and still giving me the same thing, so the program is good, no errors?
if anyone can try and post the results, i would appreciate it.
Thanks
still nothing helios...
it doesnt close, it stays open
its a blank screen
Thanks
In XCode, pressing Apple+Y will run your application in debug mode. If you see nothing apart from the build results window, press Apple+Shift+Y to bring up the debugger window, then click on the console button in the top right of the toolbar. You should see your program's output in there.

Alternatively, open a terminal window and run your app from there. e.g.

#: ~/Documents/Programming/yourapplication/build/debug/yourappname
Topic archived. No new replies allowed.