Notice: Undefined offset: 16499027 in /var/www/html/qa-external/qa-external-users.php on line 744

Notice: Undefined offset: 16428293 in /var/www/html/qa-external/qa-external-users.php on line 744

Notice: Undefined offset: 16534571 in /var/www/html/qa-external/qa-external-users.php on line 744
How do I download my c++ file as a text file? - OnlineGDB Q&A
Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How do I download my c++ file as a text file?

+11 votes
asked Sep 7, 2025 by zachad127 (220 points)
It keeps coming up as binary not text.

2 Answers

+1 vote
answered Sep 8, 2025 by Peter Minarik (101,340 points)
In the top menu, where the RUN button is, the right-most button (after BEAUTIFY) is the DOWNLOAD button.

I've just tested it, it downloaded a main.cpp for me. If I open it, it's a proper cpp source file (text, not binary).

How do you download your files?
0 votes
answered Oct 4, 2025 by MistyALT (140 points)
You should use a file name like "Myprogram.cpp" if your having troubles
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...