When you insert a USB flash drive, Windows will assign it a drive letter. For example, on my computer, when I insert a Kingston Data Traveller 1GB drive, Windows assigns it drive letter H:.
First, create a school folder on the USB drive. From My Computer, click with the right mouse button on the background area, then name the new folder.


Inside the new school folder, create folders for each of your courses. This will allow you to keep your files organized by course. To take the concept even further, create folders in each course folder. For example, for this course, create a lab1 folder.


Using Microsoft Visual Studio 2005, create a new project using File | New | Project. When the New Project wizard window appears, click Browse first and change the location to your USB drive. Then give the project a name, and uncheck the Create directory for solution check box. Don't forget to check Empty Project in the next window.






When you have created the empty project, Visual Studio will have created a folder for the project with a .sln file and .vcproj. (The other files are not important but are used by Visual Studio.)

To create a .cpp file, choose Project | Add New Item from Visual Studio. Note that the file Location is on your USB drive and is the same as the project Location — this is important so that solution, project and code files are all in the same folder. Give the C++ file a name; Visual Studio will automatically add the .cpp extension, create an empty C++ file in the project folder, and most importantly, add the C++ file to your project, so that it will be compiled and linked as a Win32 Console Application. The file is automatically opened in the text editor; you can type in code.



When you build the project, a Debug folder is created. On success, the .exe file is stored there.


If you close Visual Studio, the files that you created on your USB drive are still there. For some strange reason, Visual Studio works better with a hard disk drive, like C:.
Open My Computer.
Open your USB drive.
Click on the school folder with the right mouse button.
Choose Copy.
Open My Computer.
Open one of the hard disk drives, like C: or D:.
Click on an empty area with the right mouse button.
Select Paste. The entire school folder will be copied to the hard disk.
Note that if the school folder already exists on the hard disk, Windows will prompt you if you want to overwrite existing files. Click on Yes to all.
Use the hard disk drive to do your work in Visual Studio.
Open My Computer.
Open one of the hard disk drive that you were working on.
Right click on the school folder.
From the Send To menu, choose to send to your USB flash drive (for example, H:.)
Windows will prompt you if you want to overwrite existing files. Click on Yes to all.
Your school folder will be copied back to your USB drive with any changes that you make while working off the hard disk.
Safely remove your USB drive.