[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci & Eng] / [R J Botting] / [CSci202] / 06
[Text Version] [Syllabus] [Schedule] [Glossary] [Resources] [Grading] [Contact] [Question] [Search ]
Notes: [01] [02] [03] [04] [05] <06> [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10]
Tue May 25 11:21:52 PDT 2010

Contents


    CS202 session 06 -- streams

      Previous

      [ 05.html ]

      Preparation

      Study Chapter 9 and [ iomanip.html ] and do Review Questions.

      Note -- see the notes below!

      Due in

      Hand in one even numbered question+answer at the start of class.

      9.5 Arguments of main

      The main function in a program has arguments.
       	int main(int argc, char* argv[])
      It gets their values from the user's command. The first is a count of the number of arguments. The second is an array of old C strings (char*). The first "argv[0]" is the command the user typed! The "argv[1]" is the next word the user types. and so one. Note: argc is always one more than the subscript of the last "arg". Going past this can lead to undefined behaviors and programs crashing.

      Here is an example that you should download, compile, and run: [ puzzle.cpp ]

       		./puzzle this is a test

      The Caesar Cypher Example

      [ caesar.cpp ]

      Class Work

      [ 06q.html ]

      Next -- Census Day

      Last day to add or drop is Friday.

      Next -- OO Design

      [ 07.html ] and [ uml0.html ]

      Next project due at the start of session 8 -- and there is a bonus if good work is handed in at the start of the next session! Get started!

      Next quiz in session 8 on material in sessions [ 04.html ] [ 05.html ] [ 06.html ] and your project.

    Abbreviations

  1. Algorithm::=A precise description of a series of steps to attain a goal, [ Algorithm ] (Wikipedia).
  2. class::="A description of a set of similar objects that have similar data plus the functions needed to manipulate the data".
  3. Data_Structure::=A small data base.
  4. Function::programming=A selfcontained and named piece of program that knows how to do something.
  5. Gnu::="Gnu's Not Unix", a long running open source project that supplies a very popular and free C++ compiler.
  6. KDE::="Kommon Desktop Environment".
  7. object::="A little bit of knowledge -- some data and some know how", and instance of a class".
  8. OOP::="Object-Oriented Programming", Current paradigm for programming.
  9. Semantics::=Rules determining the meaning of correct statements in a language.
  10. SP::="Structured Programming", a previous paradigm for programming.
  11. STL::="The standard C++ library of classes and functions" -- also called the "Standard Template Library" because many of the classes and functions will work with any kind of data.
  12. Syntax::=The rules determining the correctness and structure of statements in a language, grammar.
  13. Q::software="A program I wrote to make software easier to develop",
  14. TBA::="To Be Announced", something I should do.
  15. TBD::="To Be Done", something you have to do.
  16. UML::="Unified Modeling Language".
  17. void::C++Keyword="Indicates a function that has no return".

End