Mihai's CS368-3 (Fall 1999):
|
|
Thu Nov 18, 1999 Q:About programming assignment #1: Is the average read from the input file, or do I have to compute it? |
| A:
You have to computer the average for each student. The input file contains the following information (not all on one line): <9-digit student id> <grade 1> <grade 2> ... <grade #NUMGRADES> (the angle brackets <, > are NOT part of the format, they just delimit the information in the line above). |
|
Thu Nov 18, 1999 Q:About programming assignment #1: What would be a reasonable MAX_STUDENT size for the size of my array of students? |
| A:
You can assume there will not be more than 100 student records in the input file. That limits the number of students to the range 0 - 100. |
|
Wed Nov 10, 1999 Q:Wed Nov 10, 1999 |
| A:
Once you edited your files, use the following command: % g++ -g -W -Wall <source files> This will compile the C++ files given on the command line and, if successful, it will create an executable named a.out. To run the executable, just type: % ./a.out The options given to g++ are as follows: -g : compile with debug information. Useful if you plan to run the debugger on your program. -W -Wall : print out warnings during compilation. This is make g++ print warnings about your code. In some cases, the warnings are false, but most of the time it is a good idea to go back to the source and fix it. Sometimes you want g++ to create an executable with a certain name, not the generic a.out. To do this, use the -o option: % g++ -g -W -Wall <source files> -o <executable name> This will create an executable with the name you specified. Examples: % g++ -g -W -Wall file1.C compile file1.C with debug information and warnings and put the executable in file a.out. % g++ -g file1.C compile file1.C with debug information, but without warnings, and put the executable in file a.out. % g++ file1.C -o file1 compile file1.C without debug information, and without warnings, and put the executable in file file1. |
|
Wed Nov 11, 1999 Q:How do I turn-in my solution? |
| A:
The turn-in amounts to no more than copying the required solution files in the correct turn-in directory. Here is what you need to do:
That's it! <files> is the list of files you have to turn in, named as required by the assignment. For example, for Written Assignment #1, there is only one file to turn in, named hw1. <turn-in path> is the name of the directory you have to turn in your files into, as specified by the assignment. For example, for Written Assignment #1, the turn-in path is If I turned in my HW1 solution, I would do the following:
|
|
Thu Nov 11, 1999 Q:I took some Computer Science classes a while ago. Now, whatever accounts I had there are expired. But in order to use the computers at CS for this course, I need to have a login... so what should I do? |
| A:
Your account with the CS department should have been reactivated. Try logging in to one of the machines in the CS labs. If that does not work, or if you forgot your password, please go to the CSL office, 2350 Computer Sciences and Statistics, and have your account activated asap. |