Need help: fatal error C1004: unexpected end of file found
-
I just want to practice class using, but met this problem: fatal error C1004: unexpected end of file found.Could anyone lend me a help,thank you! Code: // prac.cpp : Defines the entry point for the console application. #include "stdafx.h" #include "iostream" using namespace std; class polygon{ protected: int width, height; public: polygon(int,int); virtual int area () { return (0); } }; polygon::polygon(int a,int b) { width=a; height=b; } class triangle: public polygon{ public: int area(){ return(width * height/2); }; class quadrangle:public polygon{ public: int area() {return (width * height);} }; void main(int argc, char* argv[]) { quadrangle ax(10,5); triangle bx(10,5); cout << "ax area: " << ax.area() << endl; cout << "bx area: " << bx.area() << endl; }
-
I just want to practice class using, but met this problem: fatal error C1004: unexpected end of file found.Could anyone lend me a help,thank you! Code: // prac.cpp : Defines the entry point for the console application. #include "stdafx.h" #include "iostream" using namespace std; class polygon{ protected: int width, height; public: polygon(int,int); virtual int area () { return (0); } }; polygon::polygon(int a,int b) { width=a; height=b; } class triangle: public polygon{ public: int area(){ return(width * height/2); }; class quadrangle:public polygon{ public: int area() {return (width * height);} }; void main(int argc, char* argv[]) { quadrangle ax(10,5); triangle bx(10,5); cout << "ax area: " << ax.area() << endl; cout << "bx area: " << bx.area() << endl; }
this is unmanaged C++ ask the correct forum.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
this is unmanaged C++ ask the correct forum.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
sorry, what does that mean? how to solve it?
-
sorry, what does that mean? how to solve it?
ask the correct forum[^]...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
ask the correct forum[^]...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
toxcct wrote:
ask the correct forum[^]...
Hey Tox, The thread has been moved to the unmanaged C++ forum.
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
I just want to practice class using, but met this problem: fatal error C1004: unexpected end of file found.Could anyone lend me a help,thank you! Code: // prac.cpp : Defines the entry point for the console application. #include "stdafx.h" #include "iostream" using namespace std; class polygon{ protected: int width, height; public: polygon(int,int); virtual int area () { return (0); } }; polygon::polygon(int a,int b) { width=a; height=b; } class triangle: public polygon{ public: int area(){ return(width * height/2); }; class quadrangle:public polygon{ public: int area() {return (width * height);} }; void main(int argc, char* argv[]) { quadrangle ax(10,5); triangle bx(10,5); cout << "ax area: " << ax.area() << endl; cout << "bx area: " << bx.area() << endl; }
-
toxcct wrote:
ask the correct forum[^]...
Hey Tox, The thread has been moved to the unmanaged C++ forum.
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)it wasn't when i wrote it ;) but yup, you're right :)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
it wasn't when i wrote it ;) but yup, you're right :)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
toxcct wrote:
it wasn't when i wrote it
I know. In general, unless a thread changes mid-way into a managed question (or an unmanaged question) in the wrong forum, it's best to leave it for a day or two (without replying) so someone can move it to the right forum :-) Strange though that people can't even decide the correct forum to post their questions. They see the word 'C++' and bang - make their post!
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New) -
I just want to practice class using, but met this problem: fatal error C1004: unexpected end of file found.Could anyone lend me a help,thank you! Code: // prac.cpp : Defines the entry point for the console application. #include "stdafx.h" #include "iostream" using namespace std; class polygon{ protected: int width, height; public: polygon(int,int); virtual int area () { return (0); } }; polygon::polygon(int a,int b) { width=a; height=b; } class triangle: public polygon{ public: int area(){ return(width * height/2); }; class quadrangle:public polygon{ public: int area() {return (width * height);} }; void main(int argc, char* argv[]) { quadrangle ax(10,5); triangle bx(10,5); cout << "ax area: " << ax.area() << endl; cout << "bx area: " << bx.area() << endl; }
-
toxcct wrote:
it wasn't when i wrote it
I know. In general, unless a thread changes mid-way into a managed question (or an unmanaged question) in the wrong forum, it's best to leave it for a day or two (without replying) so someone can move it to the right forum :-) Strange though that people can't even decide the correct forum to post their questions. They see the word 'C++' and bang - make their post!
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications. Also visit the Ultimate Toolbox blog (New)i think also many people don't even know what managed C++ is (and whant managed actually means !!), and when one has a general question about C++, the fact that the main C++ forum contains "visual" in its name might tell them, "it's certainly not what i want to ask about, so, i'll go to the other C++ forum"...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]