Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.

Slides:



Advertisements
Similar presentations
Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Advertisements

Student’s Guide to TurningTechnologies NXT Clicker and ResponseWare STEP ONE: LAUNCH Go to Blackboard : Go to any of your courses.
Employees Set Up or Change “Forgot Your Password Help” And Work Address VIA “My System Profile” In EmpowHR Employees MUST set up their security question/answer.
CSE202: Lecture 1The Ohio State University1 Introduction to C++
Zhang Hongyi CSCI2100B Data Structures Tutorial 2
1 Reading Assignments Linux, g++ & dropboxes Simple C/C++ Program (again) Edit, Compile, Test, Submit CSE Lecture 2 – More Preliminaries.
Introduction to C++ Programming. A Simple Program: Print a Line of Text // My First C++ Program #include int main( ) { cout
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Preparation for working in the CSIL Basic LINUX operations.
What Data Do We Have? Sections 2.2, 2.5 August 29, 2008.
Using Pine to send your ICS111 homework First Log in into UNIX using SSH either from home (If you have previously installed SSH or from the Lab. Once in.
1 9/1/06CS150 Introduction to Computer Science 1 What Data Do We Have? CS 150 Introduction to Computer Science I.
Logging into ITAMS as a Student or Hourly Employee To Login to ITAMS for the first time: Open your web browser. Click File, Open, and type the following.
Logging into ITAMS as an Exempt Employee To Login to ITAMS for the first time: Open your web browser. Click File, Open, and type the following address:
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
Linux & Applications Sean GavinWayne State University multi-user environment -- log in: user name and password -- you never turn the computer on or off.
CS 202 Computer Science II Lab Fall 2009 September 3.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
CS 117 Section 2 + KNET Computer accounts – ed to KNET students –Change password Homework 1 Lab Tutors –In lab for next 2 weeks –Will help you with.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Agenda What is Computer Programming? The Programming Process
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
Chapter Introduction to Computers and Programming 1.
Panorama High School E.G.P./ Training to Put Students’ Grades on the Website Wednesday, September 29,
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
CS161 Topic #21 CS161 Introduction to Computer Science Topic #2.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Creating your first C++ program
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CSE1222: Lecture 3The Ohio State University1. Assignment Operations  The C++ assignment operator is: =  Examples: x = 3 * 5; y = x – 7; y = y + 4; Do.
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
CHAPTER 2 PART #1 C++ PROGRAM STRUCTURE 1 st semester H 1 King Saud University College of Applied studies and Community Service Csc 1101 By:
Files to turn in for Homework # 1 1)TimerApplet.java 2)TimerApplet.html 3)TimerSyntaxErr.java 4)TimerSemanticErr.java 5)TimerSemanticErr.html 6)HomeWork1.txt.
Creating a Web Site Using 000webhost.com The 000webhost.com Site You will be required to create an account in order to use their host computer 000webhost.com.
Creating Programs on UNIX This term you can create programs on UNIX or you can create programs using a C++ compiler on your PC. This set of slides steps.
Chapter 2 part #1 C++ Program Structure
Welcome to the Pro Bono Consulting Practice! Instructions for Federation’s Application & Reporting Syste m.
Google HOW DO I SUBMIT MY ASSIGNMENT?. To join a classroom, your teacher will give you a code.
Creating and Using Your FSA ID: An Overview
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
Java On the ENB 116 Computers The JDK is now available on the ENB 116 computers. You can use a classroom computer rather than your own laptop or CIRCE.
1 Once you log in – How to create your profile Company Name TID Contact Name - Enter your name using the format First Name space Last Name User ID – will.
CSE1222: Lecture 1The Ohio State University1. Computing Basics  Computers CPU, Memory & Input/Output (IO)  Program Sequence of instructions for the.
1 CS101 Fall 2001 Lecture 1 In order to write a program, you must first telnet to your pegasus account and login either from a Rutgers computer in a lab,
L071 Introduction to C Topics Compilation Using the gcc Compiler The Anatomy of a C Program Reading Sections
1 Logging into the new PCard (PaymentNet) System: PAYMENTNET * Introduction * May use IE 8.0 or greater or Firefox * Do not.
STRUCTURED PROGRAMMING Complete C++ Program. Content 2  Main Function  Preprocessor directives  User comments  Escape characters  cout statement.
First Day in Lab Making a C++ program
CS1010: Intro Workshop.
Great way to learn is by example so fire up Visual Studios C (at home make sure you custom install with C++ - no longer default) by Deborah R. Fowler.
Introduction to C++ Programming Language
Completing the Problem-Solving Process
Chapter 2 part #1 C++ Program Structure
Beginning C++ Programming
Creating Programs on UNIX
Intro to UNIX System and Homework 1
How to Run a Java Program
Creating the First Program
Programs written in C and C++ can run on many different computers

Running a Java Program using Blue Jay.
CSCE 206 Lab Structured Programming in C
Chapter 1 c++ structure C++ Input / Output
Wings 2.0 Business Flow Reference
Presentation transcript:

Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1

CSE User Name Your CSE user name is assigned by the CSE department. It is not the same as your OSU user name. You should have received your CSE user name in sent to your OSU account. If you don’t have your user name, see me. CSE1222: Lecture 1BThe Ohio State University2

Windows Password Your starting Windows password is: # # # # x x ! where # # # # are the last four digits of your OSU ID number and x x are your first and last initials. For example, if John Smith’s OSU ID number is , then his starting password is: 6789js! CSE1222: Lecture 1BThe Ohio State University3

CSE1222: Lecture 1BThe Ohio State University4 This is what your screen looks like when you log in to your CSE Windows account.

CSE1222: Lecture 1BThe Ohio State University5 Click on the icon on the left (not the one on the right) to switch to CSE Unix.

CSE1222: Lecture 1BThe Ohio State University6 Your CSE user name for Unix is the same as your user name for Windows.

Unix Password Your starting Unix password is: # # # # x x where # # # # are the last four digits of your OSU ID number and x x are your first and last initials. (Note: No “!” in the Unix password.) For example, if John Smith’s OSU ID number is , then his starting password is: 6789js CSE1222: Lecture 1BThe Ohio State University7

CSE1222: Lecture 1BThe Ohio State University8 Right click in the background and then select “Open in Terminal” to create a terminal window.

CSE1222: Lecture 1BThe Ohio State University9 Select the terminal window and type: xemacs first.cpp & to create your first program.

Program first.cpp Select the xemacs window and enter the following text exactly as shown below: // File: first.cpp // Created by: Your name // Created on: Jan. 3, 2012 #include using namespace std; int main() { cout << "My first program in CSE 202!" << endl; cout << "My parents will be so proud." << endl; return 0; } CSE1222: Lecture 1BThe Ohio State University10

CSE1222: Lecture 1BThe Ohio State University11

CSE1222: Lecture 1BThe Ohio State University12 Select the “File” menu and “Save first.cpp” to save the file.

CSE1222: Lecture 1BThe Ohio State University13 Select the “File” menu and “Exit XEmacs” to leave emacs.

CSE1222: Lecture 1BThe Ohio State University14 Select the terminal window and type: g++ first.cpp a.out to compile and run your first program.

CSE1222: Lecture 1BThe Ohio State University15 Note: If you forgot the “&” in “xemacs first.cpp &” and did not exit emacs, then nothing will happen when you type the command “g++ first.cpp”. Your terminal window is waiting for you to close the emacs window. Select the “File” menu and “Exit XEmacs” to leave emacs.

Compiler (g++) errors If you did not type the program in exactly as in slide 10, you may get an error message after typing “g++ first.cpp”. For example, if you forgot quotation marks on line 10, the following would happen: > g++ first.cpp first.cpp:10:39: warning: missing terminating " character first.cpp:10: error: missing terminating " character first.cpp: In function ‘int main()’: first.cpp:10: error: ‘My’ was not declared in this scope first.cpp:10: error: expected ‘;’ before ‘first’ > Error messages are often hard to understand; The most useful part of the error message is the line number (in this case 10) which tells you where the compiler detected the error. The error is usually in this line or in the line just preceding it. Try to correct your program to match exactly the code in slide 10. CSE1222: Lecture 1BThe Ohio State University16

CSE1222: Lecture 1BThe Ohio State University17 Type: ls to list the files in your directory. The computer should list: a.out first.cpp

Copying a file Type: cp first.cpp second.cpp to create a copy of first.cpp which is called second.cpp. Type: ls to again list the files in your directory. The computer should now list: a.out first.cpp second.cpp CSE1222: Lecture 1BThe Ohio State University18

Creating second.cpp Type: xemacs second.cpp & to edit the program second.cpp. Be sure to remember the “ & ”. Modify the lines: cout << "My first program in CSE 202!" << endl; cout << "My parents will be so proud." << endl; in second.cpp so that they print your name and your favorite food. Modify only the text between the double quotation marks. Be sure not to delete the double quotation marks. Select the “File” menu and “Save second.cpp” to save the file. Select the “File” menu and “Exit ” to save the file. CSE1222: Lecture 1BThe Ohio State University19

CSE1222: Lecture 1BThe Ohio State University20 Type: g++ second.cpp a.out to compile and run the program second.cpp.