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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like