User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 402,026 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,418 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 720 | Replies: 1
Reply
Join Date: Apr 2007
Posts: 4
Reputation: lionburn50 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
lionburn50 lionburn50 is offline Offline
Newbie Poster

Help i need help.. C++ unresolved external symbol?

  #1  
Apr 23rd, 2007
#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!!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2005
Posts: 3,393
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 21
Solved Threads: 385
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: i need help.. C++ unresolved external symbol?

  #2  
Apr 23rd, 2007
> 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
}
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 10:18 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC