The following code causes node being output for twice.
"
char buf[10];
while (fgets(buf, 10, rfile) != NULL)
{sscanf(buf, "%d %d", &node, &num);
cout << node << " ";
}
"
The following code causes node being output for twice.
"
char buf[10];
while (fgets(buf, 10, rfile) != NULL)
{}
"