Can I simply change a file extension of .txt to say .cpp and be able to compile it? For C++
noob here, I have an IDE with all that stuff on another computer, but I need to submit an assignment by turning in the .cpp file on this computer and I have no IDE/c++ compiler.
I ask as I don't feel comfortable downloading software on someone else computer, so I just want to use notepad to create basic C++ code, then just change the extension to .cpp and upload it for a TA to grade.
Will this work, or do I need a compiler on this system?
Posted Oct 5, 2015, 1:45 AM UTC
Why do you need a compiler if you're just submitting the source code and not the compiled code?
The only time you'll need a compiler here is if you want to test and run the code before you turn in the source.
okay, that makes sense... thanks! so a .cpp extension is just simply a .txt extension (for example) that's just named that way so the compiler recognizes it?
Pretty much yeah or rather a .cpp file is just a text file with a .cpp extension.