JSCPP icon indicating copy to clipboard operation
JSCPP copied to clipboard

Cannot use the OOP feature of Cpp

Open onion108 opened this issue 3 years ago • 1 comments

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.

onion108 avatar May 14 '22 05:05 onion108

Most object-oriented features are not implemented yet.

felixhao28 avatar May 17 '22 04:05 felixhao28