I've check this working in Chrome, but in Safari it does not work. To be more detailed it requests input before outputting. If that bug or Safari feature?
четверг, 23 октября 2014 г., 0:14:11 UTC+6 пользователь jj написал: > > Emscripten stdout is buffered and only flushes when explicitly flushed > with fflush, or when printing a new line. So try cout << "type your > name:\n"; . Does that work? > > 2014-10-22 21:12 GMT+03:00 Anton Smirnov <[email protected] > <javascript:>>: > >> Hi. >> >> I was really impressed by emscripten when i got input dialog for cin >> >> operator! >> The only issue i've noted is that input dialog is shown before output is >> done. >> >> For example for the source code: >> #include <iostream> >> >> using namespace std; >> >> int main() { >> char name[128]; >> cout << "type your name: "; >> cin.getline(name, sizeof(name)); >> cout << "hi, " << name << endl; >> >> return 0; >> } >> >> >> input dialog is shown before "type your name" is printed. >> >> Is it bug or feature? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
