1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
if(fin.is_open()) {
while(!fin.eof()) {
getline(fin, record);
iter->next = new Record;
iter = iter->next;
iter->next = NULL;
value = "";
for(size_t i = 0;i < strlen(record.c_str());i++) {
if(record[i] == '"') {
if(qFound == true) {
qFound = false;
}
else {
qFound = true;
}
}
if(record[i] == ',') {
if(qFound == true) {
record[i] = '|';
}
}
value += record[i];
}
iStream.str("");
iStream.str(value);
cout << value << endl << endl;
getline(iStream, iter->storeNum, ',');
getline(iStream, iter->verNum, ',');
getline(iStream, iter->curBusDate, ',');
getline(iStream, iter->clientID, ',');
getline(iStream, iter->hoCustID, ',');
getline(iStream, iter->custType, ',');
getline(iStream, iter->custName, ',');
for(size_t i = 0;i < strlen(iter->custName.c_str());i++) {
if(iter->custName[i] == '|') {
iter->custName[i] = ',';
}
}
getline(iStream, iter->custDOB, ',');
getline(iStream, iter->custMailAddress1, ',');
getline(iStream, iter->custMailAddress2, ',');
getline(iStream, iter->custMailApt, ',');
getline(iStream, iter->custMailCity, ',');
getline(iStream, iter->custMailState, ',');
getline(iStream, iter->custMailZip, ',');
getline(iStream, iter->custEmail, ',');
getline(iStream, iter->custPhone1, ',');
getline(iStream, iter->custExt, ',');
getline(iStream, iter->custDemo1, ',');
getline(iStream, iter->custDemo2, ',');
getline(iStream, iter->custDemo3, ',');
getline(iStream, iter->custDemo4, ',');
getline(iStream, iter->custDemo5, ',');
getline(iStream, iter->custDemo6, ',');
getline(iStream, iter->custDemo7, ',');
getline(iStream, iter->custDemo8, ',');
getline(iStream, iter->custDemo9, ',');
getline(iStream, iter->custDemo10, ',');
getline(iStream, iter->custDemo11, ',');
getline(iStream, iter->custDemo12, ',');
getline(iStream, iter->cust1stRentDate, ',');
getline(iStream, iter->raNum, ',');
getline(iStream, iter->raStatus, ',');
getline(iStream, iter->raSwitchOutDate, ',');
getline(iStream, iter->raDate, ',');
getline(iStream, iter->raInactiveDate, ',');
getline(iStream, iter->raPaymentMode, ',');
getline(iStream, iter->raPayoutDate, ',');
getline(iStream, iter->raNextDueDate, ',');
getline(iStream, iter->waiverFeeFlag, ',');
getline(iStream, iter->wkRate, ',');
getline(iStream, iter->moRate, ',');
getline(iStream, iter->smRate, ',');
getline(iStream, iter->accumRent, ',');
getline(iStream, iter->pastDue1, ',');
getline(iStream, iter->pastDue2, ',');
getline(iStream, iter->pastDue3, ',');
getline(iStream, iter->pkgCode, ',');
getline(iStream, iter->type, ',');
getline(iStream, iter->subType, ',');
getline(iStream, iter->clubFeeFlg, ',');
getline(iStream, iter->clubLevel, ',');
getline(iStream, iter->clubStartDate, ',');
getline(iStream, iter->clubTermDate, ',');
getline(iStream, iter->clubNextDueDate, '\n');
cout << iter->hoCustID << endl;
}
fin.close();
|