URGENT : strange error C4430 VS2005 with ostream
-
Dear all i have the following class header #include "stdafx.h" #include < iostream > using namespace std; class test { private: int n1; int n2; public: test(int n1,int n2); output(std::ostream& outs); }; VS 2005 display the following error error C4430: missing type specifier - int assumed. Note: C++ does not support default-int for output(std::ostream& outs); any tips i searched the net and i didn't find any solutions thanks all bye
-
Dear all i have the following class header #include "stdafx.h" #include < iostream > using namespace std; class test { private: int n1; int n2; public: test(int n1,int n2); output(std::ostream& outs); }; VS 2005 display the following error error C4430: missing type specifier - int assumed. Note: C++ does not support default-int for output(std::ostream& outs); any tips i searched the net and i didn't find any solutions thanks all bye
you have to have a return type for your class methods. Use void if there's no applicable type... class test { private: int n1; int n2; public: test(int n1,int n2); void output(std::ostream& outs); }; Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
you have to have a return type for your class methods. Use void if there's no applicable type... class test { private: int n1; int n2; public: test(int n1,int n2); void output(std::ostream& outs); }; Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
more than 3 hours try to solve this problem and then at the end IT IS VOID LOL thanks alot
-
more than 3 hours try to solve this problem and then at the end IT IS VOID LOL thanks alot