class addsub
{
public:
int Add(int A, int B);
int Sub(int A, int B);
private:
int a1;
int b1;
}
These are the errors I'm getting:
1>------ Build started: Project: T, Configuration: Debug Win32 ------
1>Compiling...
1>T.cpp
1>c:documents and settingsn0225890my documentsvisual studio 2008projectsttt.cpp(10) : error C2628: 'addsub' followed by 'int' is illegal (did you forget a ';'?)
1>c:documents and settingsn0225890my documentsvisual studio 2008projectsttt.cpp(11) : error C3874: return type of 'wmain' should be 'int' instead of 'addsub'
1>c:documents and settingsn0225890my documentsvisual studio 2008projectsttt.cpp(16) : error C2664: 'addsub::addsub(const addsub &)' : cannot convert parameter 1 from 'int' to 'const addsub &'
1> Reason: cannot convert from 'int' to 'const addsub'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>print.cpp
1>c:documents and settingsn0225890my documentsvisual studio 2008projectsttprint.cpp(11) : error C2556: 'addsub addsub::Add(int,int)' : overloaded function differs only by return type from 'int addsub::Add(int,int)'
1> c:documents and settingsn0225890my documentsvisual studio 2008projectsttprint.h(6) : see declaration of 'addsub::Add'
1>c:documents and settingsn0225890my documentsvisual studio 2008projectsttprint.cpp(11) : error C2371: 'addsub::Add' : redefinition; different basic types
1> c:documents and settingsn0225890my documentsvisual studio 2008projectsttprint.h(6) : see declaration of 'addsub::Add'
1>Generating Code...
1>Build log was saved at "file://c:Documents and SettingsN0225890My DocumentsVisual Studio 2008ProjectsTTDebugBuildLog.htm"
1>T - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========