Click here to Skip to main content
15,885,891 members
Please Sign up or sign in to vote.
2.60/5 (2 votes)
See more:
hello everyone,
i came up with a code, and the compiler is flagging errors such as:
1. new types may not be defined in a return type
2. new types may not be defined in a return type
3. `main' must return `int'

please help me
here's the link to the whole code,
because i donno which part of the code to display.
link[open in a new window]
Posted
Comments
Hamed Moezzi Azimi 5-Nov-13 14:05pm    
Hi,
Your link is not active.

A few issues;

1. You should include iostream, not iostream.h
2. The class declaration must end with ;
3. Change the return type of main from void to int

I think you want your code to look more like this;

C++
#include<iostream>

using namespace std;

class crcpara
{
public:
	void chooser_disp()
	{
		cout << "\t no:      name of the ocean \n";
		cout << "\t 1        Indian ocean \n";
		cout << "\t 2        pacific ocean \n";
		cout << "\t 3        atlantic ocean \n";
		cout << "\t 4        articic ocean \n";
	}
};

int main()
{
	crcpara plm;
	cout << " hello, this program is for enterpreuners and NOT for kids, so maintain caution "<<endl;
	cout << " please choose the ocean which your going to fish in "<<endl;
	plm.chooser_disp();
	cin.get();
	return 0;
}


Hope this helps,
Fredrik
 
Share this answer
 
Comments
A.U.K 15-Sep-13 2:27am    
thankx a lot, this was helpful :-)
Fredrik Bornander 15-Sep-13 2:33am    
Glad I could help.
If the answer solved your problem please mark the answer as Accepted so that we can close the question.
because it is similiar to use tc++ or bc++ code that copy in vs.

vs in vc++.net or vc# have some different writing and assign memory to structures.

you must write for me which software you write c codes in it .
 
Share this answer
 
Comments
A.U.K 17-Sep-13 13:07pm    
i'm using devc++

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900