fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class AbstractPerson
  5. {
  6. virtual void __stdcall Age(const int Value) = 0;
  7. virtual int __stdcall Age() = 0;
  8. virtual void __stdcall free(void) = 0;
  9. };
  10.  
  11. class Person : public AbstractPerson
  12. {
  13. private:
  14. int FAge;
  15. public:
  16. inline void __stdcall Age(const int Value) { FAge = Value; };
  17. int __stdcall Age() { return FAge; };
  18. void __stdcall free(void) { if (this) delete this; };
  19. Person() { FAge = 0; };
  20. ~Person() {};
  21. };
  22.  
  23. extern "C" __declspec(dllexport) AbstractPerson* NewPerson()
  24. {
  25. return new Person();
  26. }
  27.  
  28. int main() {
  29. // your code goes here
  30. return 0;
  31. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6:18: error: variable or field '__stdcall' declared void
     virtual void __stdcall Age(const int Value) = 0;
                  ^
prog.cpp:6:18: error: expected ';' at end of member declaration
prog.cpp:6:51: error: ISO C++ forbids declaration of 'Age' with no type [-fpermissive]
     virtual void __stdcall Age(const int Value) = 0;
                                                   ^
prog.cpp:7:17: error: '__stdcall' declared as a 'virtual' field
     virtual int __stdcall Age() = 0;
                 ^
prog.cpp:7:17: error: expected ';' at end of member declaration
prog.cpp:7:35: error: ISO C++ forbids declaration of 'Age' with no type [-fpermissive]
     virtual int __stdcall Age() = 0;
                                   ^
prog.cpp:8:18: error: variable or field '__stdcall' declared void
     virtual void __stdcall free(void) = 0;
                  ^
prog.cpp:8:18: error: expected ';' at end of member declaration
prog.cpp:8:41: error: ISO C++ forbids declaration of 'free' with no type [-fpermissive]
     virtual void __stdcall free(void) = 0;
                                         ^
prog.cpp:6:28: error: initializer specified for non-virtual method 'int AbstractPerson::Age(int)'
     virtual void __stdcall Age(const int Value) = 0;
                            ^
prog.cpp:7:27: error: initializer specified for non-virtual method 'int AbstractPerson::Age()'
     virtual int __stdcall Age() = 0;
                           ^
prog.cpp:8:28: error: initializer specified for non-virtual method 'int AbstractPerson::free()'
     virtual void __stdcall free(void) = 0;
                            ^
prog.cpp:16:16: error: variable or field '__stdcall' declared void
   inline void  __stdcall Age(const int Value) { FAge = Value; };
                ^
prog.cpp:16:16: error: expected ';' at end of member declaration
prog.cpp:16:45: error: ISO C++ forbids declaration of 'Age' with no type [-fpermissive]
   inline void  __stdcall Age(const int Value) { FAge = Value; };
                                             ^
prog.cpp:17:8: error: expected ';' at end of member declaration
   int  __stdcall Age() { return FAge; };
        ^
prog.cpp:17:22: error: ISO C++ forbids declaration of 'Age' with no type [-fpermissive]
   int  __stdcall Age() { return FAge; };
                      ^
prog.cpp:18:8: error: variable or field '__stdcall' declared void
   void __stdcall free(void) { if (this) delete this; };
        ^
prog.cpp:18:8: error: expected ';' at end of member declaration
prog.cpp:18:27: error: ISO C++ forbids declaration of 'free' with no type [-fpermissive]
   void __stdcall free(void) { if (this) delete this; };
                           ^
prog.cpp:23:22: error: expected constructor, destructor, or type conversion before '(' token
 extern "C" __declspec(dllexport) AbstractPerson* NewPerson()
                      ^
stdout
Standard output is empty