J
jstevanus
I am getting an error from my Print() function. It has something to do
with the way I'm trying to output the data from my pointer. Any help
would be greatly appreciated. Here is the code:
void SortedType:rint()
{
ofstream outFile;
outFile.open("out.data");
currentPos = listData;
if(listData != NULL) // ADDED LOOP
{
while(currentPos != NULL)
{
outFile << currentPos->info << " ";
currentPos = currentPos->next;
}
}
else
{
outFile << "Linked list is empty, No delete!";
}
}
with the way I'm trying to output the data from my pointer. Any help
would be greatly appreciated. Here is the code:
void SortedType:rint()
{
ofstream outFile;
outFile.open("out.data");
currentPos = listData;
if(listData != NULL) // ADDED LOOP
{
while(currentPos != NULL)
{
outFile << currentPos->info << " ";
currentPos = currentPos->next;
}
}
else
{
outFile << "Linked list is empty, No delete!";
}
}