Topic1 - 1 CS162 Introduction to Computer Science II...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 CS162 Introduction to Computer Science II Welcome ! CS162 Topic #1 CS162 Topic #1 2 Today in CS162 • Introduction ...what to expect!?! • Talk about the Syllabus • Discuss what Assignments will be like • Go over our Objectives The Science of Computing! CS162 Topic #1 3 Office Hours... • Are posted on my web site: www.cs.pdx.edu/~karlaf • Also, check this web site for any current announcements! CS162 Topic #1 4 Programming • First, get an ODIN account • Next, learn how to login • Try sending email! • Learn how to exit the ODIN menu and enter the UNIX shell • Sign up for a UNIX tutorial session CS162 Topic #1 5 Programming • Login to Odin using ssh or putty (odin.pdx.edu). If you don't have an odin account or password you will need to get one. • If you don't have one go to: www.account.pdx. edu and for help go to: www.oit.pdx.edu CS162 Topic #1 6 Programming • Start up the program called ssh – you should be able to find a free site from which to download it. It is a secure shell program and allows your computer to act as a ‘dumb terminal’ for logging in remotely. You start up ssh by double clicking on it. – Then, connect to: odin.pdx.edu – Use your odin login name and password CS162 Topic #1 7 Programming • When you login into Odin, Hit return. Then hit 4 <enter > to exit the menu. • From there, you need to make a new directory, so type: mkdir cs162 <enter> • Now, to enter that directory to start to work type: cd cs162 <enter> CS162 Topic #1 8 Programming • One approach: Use pico to type in a program. So, type at the unix prompt: pico prog1.cpp <enter> • Enter in a Program. Start with something simple just to make sure it all works right! CS162 Topic #1 9 Programming • When done hit control o at the same time to write it out and then control x to exit . • Compile your C++ source code file. The command to do this is: g++ prog1.cpp CS162 Topic #1 10 Programming • If your program successfully compiles, it will produce a file named 'a.out' in your directory. Otherwise, you will need to correct syntax errors before continuing - by using pico again: pico prog1.cpp • One common mistake is to make typos! • Run your program by typing: ./a.out 11 CS162 Introduction to Computer Science II C++ CS162 Topic #1 Introduction to C++ • C++ is based on the C language – it started as a superset of C – to retain the power and flexibility of C – to deal effectively with hardware/software interfaces and low level programming • Developed in early 1980‟s – by Bjarne Stroustrup to simplify complex event driven simulations 12 CS162 Topic #1 Introduction to C++ • While a major design goal for C++ was to keep it upward compatible with C – C programs need to “unlearn” some of the techniques used in programming – Improvements were made which keep C++ from being 100% compatible – C++ inherits the basic language mechanisms of C (operations, statements, loops, pointers, arrays) but then adds features to overcome the problems in C 13 CS162 Topic #1 Introduction to C++...
View Full Document

This note was uploaded on 09/30/2011 for the course CS 162 taught by Professor Fant during the Spring '08 term at Portland State.

Page1 / 122

Topic1 - 1 CS162 Introduction to Computer Science II...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online