Visual Studio is not the only way to write and create programs in C++ on MS Windows. In fact, among IDE's (Integrated Development Environments) it is not even the best way. For the types of programs that we are writing it can actually get in the way.
In general to create programs you need:
On any system you already have an editor available, e.g., on Windows you have Notepad and Wordpad. These can be used to create the programs (.cpp files).
The compiler is another issue. Most other IDE's (Integrated Development Environments) such as Eclipse, use the gcc C++ compiler. Also, you can use this compiler directly. To install it on Windows, you will have to install Cygwin (www.cygwin.com). The next section has a relatively painless way to do so.
I have come up with an easier way to install Cygwin with the needed extra packages (i.e., g++, make) to build your programs, and to use Subversion (SVN).
First, download these two files to your desktop:
Then, doubleclick the cygwin-install.bat. A couple of windows will pop up, including "Cygwin Setup". Let them work.
This may take a while. At home, it took about 10 minutes to download everything and install it.
When it is done, you will have a few things on the desktop, including something with the name rxvt (really, rxvt.bat). This provides a shell, a way of entering commands such as to compile your program.
Go ahead and doubleclick on the rxvt. It should popup a window containing a shell. This is where we will enter commands.
The first command to enter is to get your files from the repository (Subversion). The command to do this is:
svn checkout http://classes.cs.kent.edu/courses/cs33001/svn/020/username/cs33001_student
where username is your, well, username.
If you want to check out my code examples:
svn checkout http://classes.cs.kent.edu/courses/cs33001/svn/020/collard/cs33001_eg
Now we are all set up to actually do some work. Back to the shell (rxvt).
First, note that with this shell you can get previously entered commands by using the up/down arrow keys.
First, you must get to the directory that contains your files. This is done using the command cd. To from your current directory to your program files:
cd cs33001_student
See what directory you are in:
pwd
See what files are in the directory:
ls
See what files are in the directory in more detail:
ls -lh
Create a directory:
mkdir Project1
Move to the project directory:
cd Project1/
See what files are in there:
ls -lh
Compile a program in the file main.cpp
g++ main.cpp -o main.exe
Execute your program:
./main.exe
And to move back to the desktop:
cddesk
You can use Notepad, Wordpad, or even Visual Studio to edit your files.
The command to commit changes with the svn client program is:
svn commit -m "Message here"
You can see the current svn status of your working copy with:
svn status
To see the difference between your current version of a file and the last time you committed:
svn diff
To update your files with my changes (if I have made any):
svn update
To see what versions of a file are available:
svn log main.cpp
To move to a particular version of the file:
svn update -r version_number main.cpp