where is the faq?
Type: Posts; User: cmasri
where is the faq?
void ListFileHDD(ifstream& fin)
{
char line[500];
while (!fin.eof())
{
fin.getline(line,'\n');
}
cout<<line;
ms visual studio.net 2003
yes it compiles....
I already did, i'm still stuck
void ListFileHDD(ifstream& fin)
{
string line;
while( getline(fin, line) )
{
cout<<line<<endl;
}
getting error C3861: 'getline': identifier not found, even with argument-dependent lookup
it did not compile...
error C2039: 'getline' : is not a member of
error C3861: 'getline': identifier not found, even with argument-dependent lookup
error C2679: binary '<<' : no operator found...
void ListFileHDD(ifstream& fin)
{
string line;
while (!fin.eof())
{
getline(fin,line);
}
cout<<line;
}
void ListFileMem(StudentRecord** Records, int numRecords){
cout<<"LIST RECORDS FROM MEMORY";
string fullname, firstname, lastname;
if (numRecords>0)
{
for (int k=0; k<numRecords;k++)
{...
void ListFileMem(StudentRecord** Records, int numRecords){
cout<<"LIST RECORDS FROM MEMORY";
string fullname, firstname, lastname,space(" ");
if (numRecords>0)
{
for (int k=0;...
thank you that works.
another question....
the loop that you are referring to is copying old data from a temporary array.
made improvements according to your suggestion, is that better?
StudentRecord**Temp; /*Declare array of pointers...
the value of num records is 0 when that line executes.
it is an assignment requirement to do it this way. It's the prof's specification. What would it look like in vectors anyway?
bool AddRecord(StudentRecord**& Records, int& numRecords){
/*Please tell me if I have memory leaks.*/
/*
struct StudentRecord
{
char* firstName; // student key
char* lastName; //...
I don't understand this code. It is an assignment requirement to program it with array of pointers to struct. see http://ca.geocities.com/[email protected] assignment0 for your reference.
Thank you it works!!
bool AddRecord(StudentRecord**& Records, int& numRecords){
struct StudentRecord
{
char* firstName; // student key
char* lastName; // student name
int id; //student id
float mark; //...