CSE 250: Data Structures Week 1 January 14 - 18, 2008

advertisement
CSE 250: Data Structures
Week 1
January 14 - 18, 2008
Monday
Syllabus
Course Policies
Wednesday - Announcements
If you have not picked up a syllabus,
please do so before or after class.
If you have not signed the sheet on the
back of the syllabus please do so and turn
it in.
If you are having registration issues,
please come and see me.
Wednesday – Game Plan
Questions about course/course policies
Review: Recursion
Intro to C++ - some basics
Wednesday
What do we know about recursion?
Base cases (one or more)
Simplest cases
Stopping points
Recursive functions call themselves
They can be hard to write
Need to make sure they stop and at each point
keep breaking up the work needing to be done
Wednesday
Compiler is g++ (version 3.4.6)
Compiler command (one of)
g++ -Wall filename –o executableName
You fill in the appropriate filename and what you want
the executableName to be. The filename is the file to
be compiled.
Filenames for C++ can have many different
extensions, a common one that works is .cpp.
Friday Announcements
If you have not picked up a syllabus,
please do so before or after class.
If you have not signed the sheet on the
back of the syllabus please do so and turn
it in.
If you are having registration issues,
please come and see me.
Friday – Game Plan
Homework 1 posted - discuss
Keep working on program from last time
(smallest.cpp)
Computing environment
Friday
Servers to run on:
In Bell 216 Lab
(nickelback.cse.buffalo.edu)
Remote connections
(timberlake.cse.buffalo.edu)
Friday
 To run program you need to type the name of
the executable
./executableName
 Programs need main function.
 Output using cout,
Need #include <iostream> to use
 Should put in using namespace std; to have
access to all things declared in namespace
called std (namespaces are like packages)
Friday
Sample program (named smallest.cpp) is
in directory:
~adrienne/250/Smallest
You will need to cd directly into the
~adrienne/250 directory. My
~adrienne directory is not world
readable.
Download