Hi .... i'm getting the following error " 'buildListForward undeclared' when trying to compile this program.
Please help !
//Linked lists
//Pg.288
#include <iostream>
using namespace std;
nodeType* buildListForward();
int main()
{
buildListForward();
nodeType* buildListForward()
{
nodeType *first, *newnode, *last;
int num;
cout << "Enter a list of integers ending with -999.\n";
cin >> num;
first = NULL;
while (num != -999)
{
newNode = new nodeType;
assert(newNode !=NULL);
newNode ->info = num;
newNode ->link = NULL;
if(first == NULL)
{
first = newNode;
last = newNode;
}
else
{
last -> link = newNode;
last = newNode;
}
cin >> num;
}
};