3 Replies - 162 Views - Last Post: 23 September 2012 - 05:39 PM Rate Topic: -----

#1 JMurray308  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 08-September 12

unresolved external error?

Posted 23 September 2012 - 05:00 PM

.1.obj : error LNK2019: unresolved external symbol "void __cdecl sortArray(double * const,int)" (?sortArray@@YAXQANH@Z) referenced in function _main
1>C:\Users\John Murray\Documents\Visual Studio 2010\Projects\lab 16.1.cpp\Debug\lab 16.1.cpp.exe : fatal error LNK1120: 1 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========





i have been asked not to dump code and i am not doing that intentionally so i will try it again and only post the error message...I am fairly net to C++ and know that this type of error is something mechanical such as braces but i have checked those and they were ok as far as i could tell. Does anyone know what to look for for this type error as i do not want to "dump code again" for fear of offending the admin of this site. i have managed to resolved all the prior errors myself without any further dumping but can not figure this one out. but again i am very new to this site and apologize in advance and again for my past transgressions.

Is This A Good Question/Topic? 0
  • +

Replies To: unresolved external error?

#2 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 1916
  • View blog
  • Posts: 5,725
  • Joined: 05-May 12

Re: unresolved external error?

Posted 23 September 2012 - 05:24 PM

That means that you are making a call to a function called sortArray, that take a double * const, and an int as a parameter, but you haven't actually written the code for such a function.
Was This Post Helpful? 0
  • +
  • -

#3 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 978
  • View blog
  • Posts: 3,397
  • Joined: 19-February 09

Re: unresolved external error?

Posted 23 September 2012 - 05:31 PM

The compiler is complaining because your function does not have the same parameters as your function.

// your prototype
09	void sortArray(double numScores[], int);


// your function header
47	void sortArray(int numScores[], int size)
{
  // ...
}


Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 9037
  • View blog
  • Posts: 33,523
  • Joined: 27-December 08

Re: unresolved external error?

Posted 23 September 2012 - 05:39 PM

Quote

i have been asked not to dump code and i am not doing that intentionally

I'm not saying don't include your code. Posting your code is often necessary if you're having a problem with it. What I am saying is to not simply dump your code without any description or question. When posting a question, please:
-Post your code
-Post your errors
-Post a clear description of what you are trying to accomplish and your question

I explained this over PM as well, and you are welcome to contact me through PM if you have any further questions. We want to help you; but in order to do that, you have to provide us with the necessary information.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1