Problem Instructions File that you must write # 1. readwrite.h : The header file
ID: 3634026 • Letter: P
Question
Problem Instructions
File that you must write
# 1. readwrite.h : The header file (class definition) for this assignment. You don't need to do anything to this file, just read the instructions.
# 2. readwrite.cpp : You will need to implement all of the functions in this file. A skeleton has been provided.
Other files that you may find helpful
# 1. in.0 : Input file containing some grades to be read in.
# 2. testprog1.cpp : A main program that you can compile against your class to test it.
# 3. testprog2.cpp : Another main program that you can compile against your class to test it.
Discussion of the Assignment
Most of the instructions and comments are in the files, so read all of them before trying to implement it.
To compile your program, let's assume you have these files in your directory:
readwrite.h readwrite.cpp testprog1.cpp in.0
Then execute these commands:
g++ -c readwrite.cpp testprog1.cpp
The -c option tells the compiler to compile the two files separately. If you want to run the other main program, just substitute testprog1.cpp with testprog2.cpp. At this point, your directory will contain two more files, namely readwrite.o and testprog1.o (or testprog2.o if you compile it with the other main program). These are the object files.
g++ readwrite.o testprog1.o -o readwrite
This command will link your object files into an executable (readwrite.exe). (Similarly, you can also link it with testprog2.o).
Following are the file named above, available to download:
#1. readwrite.h: http://visionlab.engr.ccny.cuny.edu/~tao/teaching/csc102/fall11/hwData/readwrite.h
# 2. readwrite.cpp: http://visionlab.engr.ccny.cuny.edu/~tao/teaching/csc102/fall11/hwData/readwrite.cpp
--
#1. in.0: http://visionlab.engr.ccny.cuny.edu/~tao/teaching/csc102/fall11/hwData/in.0
#2. testprog1.cpp: http://visionlab.engr.ccny.cuny.edu/~tao/teaching/csc102/fall11/hwData/testprog1.cpp
#3. testprog2.cpp: http://visionlab.engr.ccny.cuny.edu/~tao/teaching/csc102/fall11/hwData/testprog2.cpp
Thank you everybody for your help!!!
Explanation / Answer
http://ubuntuforums.org/archive/index.php/t-786095-p-6.html hope this helps u
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.