. CSci202 Laboratory 01: Review: editing, compiling, testing,... Note: In my experience, there many things that make this harder than it looks: no account, no experience of UNIX, account shut down, forgetting things learned in CSci201, and updated operating systems and compilers. .Open Goals To have logged in and used our Linux Lab computers. To have found and looked at the CS202 WWW site. To have found and looked at the Computer Science Club site. To have created, compiled, and run a simple C++ program. .Close .Open Ideal Scenario If any these steps seem impossible check the $Exceptions below and/or ask me for help. Login as usual. Start Firefox(or other browser). Input this URL in the location box: .See http://csci.csusb.edu/dick/cs202/ Try all the links at the top of the page.... where do they go? Can you find the way to this lab page? Go to .See http://www.cs.chalmers.se/~skanshol/cpp_eng/corrsecond1.html and correct published errors in our text book. There are more documented by the Computer Science Club (next). Visit the Computer Science Club .See http://club.csci.csusb.edu/ and it's forums .See http://club.csci.csusb.edu/forums Create the smallest C++ program you can think of that outputs something when run. Make your program compile. Please see $Hints below. Run and test your program. Show me and get an A! Close down your browser and logout before you leave the laboratory. (IMPORTANT). . Deliverables Show me what you have found on the web sites. Point out an error or ask a question. Show me your program, on the screen and run it. . Due Before the end of the laboratory period. .Close Ideal Scenario .Open Exceptions If you don't have an account, haven't done this before, or your account has died over the summer, tell me and get an instant extension to complete the lab during the week. When done check in to my office... you can login and demo your work there. Or else show me next week in the lab. .Open 1a If you haven't used our Linux before Tell me! I will figure out what to do depending how many people are new to Linux. .Close .Open 2a If you don't have an account First ask me.... Ken usually gives me a list of newly created accounts. Or fill in the form asking for one. In the lab, sit with someone who does have an account. Learn by watching them, asking questions, and taking notes. You may need to study the recommended UNIX books. Wait for your account to be created (typically 48 hours) and then do the lab. .Close .Open 2b If your CSCI account doesn't work Fill in the form reporting the problem and put it in the box provided down the corridor, or hand it to the technicians or EMail khan@csci.csusb.edu Tell me! Wait for your account to be fixed (typically 24 hours) and then do the lab. When done check in to my office... you should be able to login and demo your work there. .Close .Open 3a If Firefox refuses to work because it is running elsewhere Use Konqueror for this lab. Go back to the machine where you left Firefox running and kill it. (I can help with the correct UNIX commands to kill a "zombie" process") .Close .Close Exceptions .Open Hints Put simple C++ programs in files that end ".cpp", for example "lab01.cpp". I strongly suggest that in these labs you use my `Q` command. I makes compilation and testing of lab programs very much easier -- less typing, less worrying, and it stores a copy of each compiled program ready to be used. Use it like this: .As_is Q lab01.cpp It will compile `lab01.cpp` to give output `lab01` and then run it as a test. The compiled program can be run at any time .As_is ./lab01 Q will also handle most languages that we have on our lab machines. Or you can compile C++ programs with the command: .As_is g++ -w -I/usr/include -o name name.cpp Different people use different editors to create their source code: `vi`, `emacs`, `kate`, ... Use whatever you like... and then use `Q` to test the code. I am an expert in using `vi` and can help you with it. You can integrate `Q` and `vi` by this command: .As_is Q cs202 and it also makes `vi` number your file. If you've used and like Eclipse.... that is OK ... and you can help me! .Close