Blank screen

Joined
Dec 22, 2007
Messages
1
Reaction score
0
Points
1
hello friends

i am not sure if this is right place to post so sorry in advance if it is not.

i am very interested in learning C++ so i started it with Xcode.
i do not have any previous knowledge of C++. i wrote very first basic program which is as follows

#include <iostream>
using namespace std;

int main()

{
cout<<"Welcome to C++";

return 0;
}

with this code i am having error message about int main() saying it is repeating so i changed it my new code is like as follows

#include <iostream>
using namespace std;

int mainfunction()

{
cout<<"Welcome to C++";

return 0;
}

with this code compile is successful build is successful no error message.
Now real problem is that when i run it, it produce only blank screen, nothing what so ever on it. Please can anyone advise me whats wrong with it why it does not show "Welcome to C++"
Any advise is appreciated
Thanks in advance
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top