CSCI 1200 - Spring 2006
Computer Science II
General Information:
Home
Announcements
Class Policies
Lab Times
Resources


Course Content:
Calendar
   Lecture notes,
   Lab materials,
   Homework, &
   Test reviews
Submit Homework

Resources

 Koenig and Moo textbook homepage
 SGI's STL (standard template library) homepage
  

Extra Help

 TA Office hours
 Advising & Learning Assistance Center Drop in Tutoring
  

How to redirect input from within Visual Studio

 
  1. Create input.txt file that contains input which you would otherwise type during program's execution.
  2. Move the file into your project's directory (this is where the project files are).
  3. In Visual Studio, go to Project->Properties, select 'Debugging' and in 'Command arguments' put '< input.txt'. (without the quotes)
  4. The 'Working directory' is by default directory of your project files, so you don't need to change it.
  5. When you run your program from within Visual Studio, the input from the file input.txt will be redirected to your executable.
 

How to redirect input & output in Cygwin/Linux/FreeBSD

  At the command prompt simply type:     program.exe < input.txt > output.txt
 

Cygwin

  You probably already have Cygwin on your laptop (part of the RPI default installation). What is it? It's a UNIX environment for the Windows Operating System. You can do all of your work for this class using Cygwin, g++, and a text editor such as Emacs (i.e., you don't need to use Visual Studio). Read more about Cygwin here:
 

Emacs on Windows

  For those of you interested in running the Emacs text editor on your Windows OS, you can download the binaries and access documentation here: