Week 8
Monday
strchr, strstr, strtok
parsing a line into words
delimiter
token
Assign Homework
Read Schaum's Chapter 9
Tuesday
Linux
Putty          
On Mac, there is a similar, built-in application called Terminal.
To start Terminal, go to your Mac’s Applications folder => click on the Utilities folder => then click on Terminal.     
Terminal - used to interact with "main-frame" computers
Terminal Emulator (Putty)
Linux - Unix based operating system
Distributions/Distros/Flavors
Taz - a server running "CentOS release 6.4" in the HU cs department
commands ... ls, cd, cat, rm, mkdir,passwd
linux os
commands - command line programs for necessary operations
   ls or ls
   cp – copy a file to another location
   mv – rename a file
   cd – change directory/folder
   mkdir – create a directory/folder
   rm – remove file (rm –r )
   rmdir – remove directory
   pwd – print working directory
   cat – shows contents of a text file
   man/info – to get help on a program
   clear – clears the screen
   nano – text editor
   sudo – run a program as the root (super user)
   vi – text editor
   command line history using up and down arrows
   ./programName - to use a program in the current directory
compile a program using g++
   g++ program.cpp -o program
run a program
   ./program
 
Wednesday
C++ strings
Pig latin using c++ string
Assign Project
Bible Concordance (Due Wednesday, week 9)
 
Examples
 
Thursday
String Streams
   istringstream
   ostringstream
File input            
   ifstream
   file handle
   .open
   .close
   .eof  - end of file
   .fail 
   
   Check to see if a file exists
   Text files contain text (.txt, .cpp, .html, .xml, .csv ...)                        
 
Examples
 
Friday
Command Line Arguments  in C++
  • int main(int argc, char* argv[])
  • argc is a count of the number of arguments entered on the command line.  It will always be 1 or greater because the name of the program is the first argument.
  • argv is a list or "vector" of arguments in the form of an array of c-style strings
 
Examples