help on my first basic program

kalessi

In Runtime
Messages
132
Location
Normal
Im having trouble with my first basic program for c++. I keep on getting an error. error c2084. I attached scrrenshot any help would be appreciated.
*********************************************************************************
int main()
{
// Start of the program
//end of the program
system("pause");
return 0;
}
int main()
{
// Start of the program
cout << "Hello, my name is Stella." << endl;

// End of the program
system("pause");
return 0;
}
 
You can only have 1 function called main.

Completely remove the part that says
Code:
int main()
{
// Start of the program
//end of the program
system("pause");
return 0;
}
 
I'm not going to do your homework for you, but if you have specific questions then I can answer those.

You're not supposed to create each of those as separate files, or even duplicate that code multiple times. You're supposed to be adding onto the code with what your instructor has in that assignment. Follow the instructions of the assignment...it's straightforward.
 
I'm so sorry... the course uses Blackboard :tongue:
But yeah, read the instructions thoroughly. He's showing you a piecemeal way of making the program, and does it in a weird order IMO. But it's still pretty straight forward.

he wants you to add everything to the same int main(), not separate
 
Back
Top Bottom