Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use the OOP feature of Cpp #154

Open
onion108 opened this issue May 14, 2022 · 1 comment
Open

Cannot use the OOP feature of Cpp #154

onion108 opened this issue May 14, 2022 · 1 comment

Comments

@onion108
Copy link

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.
@felixhao28
Copy link
Owner

Most object-oriented features are not implemented yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants