Sunday, August 8, 2010

Copy paste in C++

Opening a text file or document in C++ is not just by using the copy and paste procedure or the shortcut keys ctrl+c and ctrl+v. Using copy-paste doesn't work. The right way of opening a text file or document in C++ environment is by saving the text as a text document (*txt) using notepad. To find notepad go to start>programs>accessories>notepad. To open the text file or document you have saved, run C++ and click file then open. To open the text you have saved, you must change the location by the location where you have saved your file. For example, you have saved your text file named project1 into your drive d. To locate your saved file type d:\*project1.txt or d:\*.txt to locate all txt files. By clicking on your project, the program will show you the content of the file. To open a copied or previous saved C++ file, the procedure is the same. It's just a matter of changing *.txt  to *.cpp because txt is a text file and cpp is a c++ file, they're not the same.

                                                                                                                                 Happy programming!

No comments:

Post a Comment