0
#include<iostream>
usingnamespace std;
constint ArraySize = 8;
int seqSearch(int list[], int listLength, int searchItem);
 
int main()
{
int index;
int intList[ArraySize];
int name;
 
cout<< "Enter 8 names: " << endl;
 
for (index = 0; index < ArraySize; index++)
cin>> intList[index];
cout<< endl;
cout<< "Enter a name to search for... ";
cin>> name;
cout<< endl;
 
index = seqSearch(intList, ArraySize, name);
if(index != -1)
cout << name << " is found at position " << index << endl;
else
cout<< name << " is not found." << endl; 
return 0;
}

thats all the code and when it compilies i get the "fatal error" that says unresolved external symbol.. i have NO idea how to fix this.. please help...

thank you!!

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by Salem
0

> usingnamespace std;
First of all, you need to stop using whatever crappy code colouring tool which removed the space between "using" and "namespace".

It's hard enough to help people sometimes without having extra problems inserted.

> i get the "fatal error" that says unresolved external symbol

You've got this int seqSearch(int list[], int listLength, int searchItem); But you also need to write the function itself

int seqSearch(int list[], int listLength, int searchItem) {
  // actual code here
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.