Convert Text File to Source Code File [Windows 10]

I would like to change a plain text file code.txt into a c++ source code file code.cpp. I would think this would amount to only a simple renaming of the file, but on Windows 10 I can't see how to do this. I seem to not be able to change the file extension.

1

1 Answer

Every programming language (with a few exceptions) are all text files.

You should just select the text file in File Explorer, right click, select rename, and enter in code.cpp. CPP is the common C++ extension for C++ programs.

If you do not see extension, click the View menu item in the menu bar in File Explorer, and uncheck Hide file extensions. This will allow you to rename the file and extension.

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest