hello, can someone help me, when I put the codes from my book and edited them to use filestream, I encounter an error
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
struct nodeType
{
string info;
nodeType *link;
};
int main()
{
nodeType *head = NULL;
nodeType *newNode;
nodeType *p;
ifstream reeaad;
reeaad.open("meow.tx");
newNode = new nodeType;
while(!EOF)
{
getline(reeaad,newNode->info);
newNode->link = NULL;
};
p=head;
p->link=newNode;
nodeType *temp;
int counter = 1;
temp = head;
while(temp!=NULL)
{
cout<<"node:"<<counter<<" ";
cout<<"Info:"<<temp->info<<"\n";
cout<<"---------------\n";
temp = temp ->link;
++counter;
};
system("pause");
return 0;
};