+ 3
[SOLVED] Why can’t I output to a file? (C++)
https://code.sololearn.com/clWvh3t7pM16/?ref=app I made this program to output itself and before that, add “hello” to the file, but it isn’t changing the file at all. Writing the file’s contents works just fine, but not modifying it. I tried with both C++ ofstream and C FILE*.
3 Respuestas
+ 2
@Jacob Pembleton
Is the name of every C++ program being compiled on the Sololearn Compiler called 'source.cpp'?
+ 2
@Kinshuk Vasisht
Yes, all programs here are source.(extension name), besides maybe web because of multiple files for HTML, CSS, and JS.
+ 1
Thank you very much. I just had another query. Do you know what happens when multiple users try to compile codes in the same language at the same time? Does the name remains the same or does it change to something else?
// I agree these are very rare cases.
// But this may be the reason at times
// our codes do not compile... right?