CIS 181 Intro to Computer Science
Class 1, February 8, 2005UNIX TIP OF THE DAY:
Make sure you have activated your University computing account and
taken the Electronic Community Citizenship Exam (ECCE)!
If you haven't already, get to know how to use the email system here at the UofD. Send mail to a friend. Get in the habit of checking
your mail every day to see if there are any class messages.
-----------------------------------
Assignment due February 10:
Reading: D&D, Chapt 1
Exercises: pp. 61-65 #1.2, 1.12, 1.15
TODAY'S TOPICS
-----------------------------------
-
Introductions
and getting to know the class
- Distribute
and discuss syllabus
- Introducing the course home page see:
http://www.cis.udel.edu/~mccoy/courses/cisc181.05s
- Basic
Machine Organization
-
Basic C++ Environment -- preprocessing, compiling, linking, and
basic Unix commands
-
Compiling and linking c++ programs on our system
-
A first instance of a C++ program -- in the directory
$CLASSHOME/examples/
see the files
00-welcome.cc,
00-welcome-using.cc,
00-welcome2.cc,
00-welcome3.cc, and
fig1.6.cc.
Discuss the program(s) line by line
-
comments
- preprocessor directives
- the main function.
Note that the body of the function begins with
a left brace and is terminated by a right brace.
- statements, e.g. declarations, are always terminated by a
semi-colon
- The stream insertion operator << (used to print or insert info
onto
the terminal screen)
- endl is an I/O manipulator
- declaring variables
--
valid symbols for variables (and other parts of C++ programs) are
called identifiers and are series of characters formed from
letters (both upper & lower case), digits, and underscores (_)
but the identifier must not begin with a digit.
- The stream extraction operator >> (used to read or extract info from
the terminal screen)
- Note formatting conventions.
-
Compiling (preprocessing, compiling, linking) and executing the program.
Use the two Unix commands
CC welcome.cc
a.out