nodeType* buildSet()
{
nodeType *first, *newNode, *last;
first = NULL;
int num = 0;
string input = "";
getline(cin,input);
stringstream myStream(input);
while(myStream >> num)
// while(num != -999)
{
newNode = new nodeType;
newNode->info = num;
newNode->link = NULL;
if(first == NULL)
{
first = newNode;
last = newNode;
}
else
{
last->link = newNode;
last = newNode;
}
getline(cin,input);
// cin >> num;
}
return first;
}
views:
38answers:
1
Q: