Cannot use the OOP feature of Cpp
onion108 opened this issue · comments
27Onion Nebell commented
My code run well on my local compiler but can't run normally on JSCPP.
Source Code:
#include <iostream>
using namespace std;
class Main {
public:
Main() {
cout << "Program Started.";
}
int run() {
cout << "Hello, World!" << endl;
return 0;
}
~Main() {
cout << "Program Exited.";
}
};
int main() {
Main mainProgram;
return mainProgram.run();
}
And that's what JSCPP says:
Error: ERROR: Parsing Failure:
line 4 (column 12): ce std;\n\nclass Main {\n public:\n Ma
------------------------------------------^
Expected "(", ",", "/*", "//", ";", "=", "[" or [ \n\r\t\u000B\u000C] but "{" found.
Felix Hao commented
Most object-oriented features are not implemented yet.