|
|
|
|
|
by SamReidHughes
2712 days ago
|
|
It fails to compile the program #include <iostream>
int main() {
int x = 23;
std::cout << x;
return 0;
}
It seems like it can't handle namespaces.When I write #include <vector>
it complains, "cannot find library: vector".I think this isn't going to be very useful for people unless you get a C++ evaluator that works correctly. There is a demo of Clang running in the browser using webassembly here: >> https://tbfleming.github.io/cib/ << but it doesn't actually work for me on Firefox. Maybe I need to use Chrome. That is probably a better option for getting C++ running in the browser. |
|
Which notable features are not implemented yet?
The target audience would consists in students trying simple algorithms. By the end of the high school, students are only using very basic C-syntax: variables, arrays, functions, and a couple of functions from the standard library.Some partial implementations: iostream (only cin and cout and endl) cmath cctype cstring cstdio (partial) cstdlib (partial)
Other includes could be added too.
What I am trying to highlight is if there is any possibility to increase the visual feedback for students heading first to programming.
Something more like an interpretor would be more suitable in this case, but the wasm compilation doesn't seem too slow though. Thanks for this demo!