Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Simple Debug?

Status
Not open for further replies.

bradmanda

Programmer
Feb 24, 2007
2
0
0
US
Trying to build a project containing header files/accomplish modularity. As I attempt to compile, the following error pops up:

school5.cpp(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int


Looking on other forums, there might need to be some reconfiguring with the current sdk. Any tips for this tyro? The unruly code is pasted below.


// =====================================================================
// school5.cpp
// Constructors, Destructors, and Projects
// =====================================================================
#include <iostream>
using namespace std;
#include "course5.h"
#include "tom.h"

main()
{
cout << TITLE << endl << endl;
do
{
CCourse course;
course.Report();
}
while (tget("\n\nEnter another course") == 'Y');

cout << "Press ENTER to end ";
cin.ignore();
cin.get();
return 0;
}

 
Use [ignore]
Code:
[/ignore] tags when posting code.

I'm guessing the error is referring to the line with main()?

You're returning 0 at the end of main(), but you didn't specify a return type for main().
Code:
[b]int[/b] main()
{
   ...
   return 0;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top