char name[61];
char director[31];
char cast[156];
short int duration,
year,
rating,
category;
This will add up to 256 bytes so the recordset is 256 in the binary
file.
when the program starts it opens the binary file it it has to read all the records into a dynamic string.
ifstream infile("m.dat", ios::in | ios:ut | ios::binary);
infile.seekg(0, ios::end);
fsize = infile.tellg();
infile.seekg(0, ios::beg);
if(fsize){
current = new char[fsize];
my problem is that when i copy the records into the string it will not hold the spaces.
What i mean is if the first ten spaces in name from binary has "jjjjjjjjjj" and the rest of the 51 spaces are empty.
i want the string current to hold "jjjjjjjjjj" + 51 spaces;
How can i do that;
this is a console app on win. using borland