1) prompt.h and prompt.cpp -- you need to specify function return values.
2) program is using uninitialized struct member in function Add_vcd(). You can fix that problem by adding a class constructor to the structure which initializes it.
struct vcdDB_T{
vcdRec_T vcdRecords[maxSize];
int vcdIndex;
public:
vcdDB_T() {vcdIndex = 0;}
};
There appear to be other problems too, such as displaying junk records.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Well you do use eof() in a control loop, which is bad
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351
eof() is a state (the result of a past failure), not a prediction (of a future failure).
That is, if you have a 10 char file and read 10 chars, then eof() will NOT be true. It's only when you try to read (and fail) to read the 11th char that eof() will become true.
The corrollary of all this is that ALL your file read functions should check their return result to see that they succeeded.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953