Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2009, 02:38 PM
Friend of Wrox
 
Join Date: Mar 2008
Posts: 133
Thanks: 15
Thanked 1 Time in 1 Post
Send a message via ICQ to iceman90289 Send a message via AIM to iceman90289
Default Hello all im back... again..... again..

im trying to create a dummy object from my cPlayerInfo class inside a member function of another class.

my error:
Code:
 
winmain.obj : error LNK2019: unresolved external symbol "public: __thiscall cPlayerInfo::cPlayerInfo(class cPlayerInfo const &)" (??0cPlayerInfo@@QAE@ABV0@@Z) referenced in function "public: class cPlayerInfo __thiscall cParser::Decipher(char * const)" (?Decipher@cParser@@QAE?AVcPlayerInfo@@QAD@Z)
C:\Documents and Settings\David\My Documents\C++\WinSock\AsynchServer\server\Debug\server.exe : fatal error LNK1120: 1 unresolved externals
 
now here is my function:
i am trying to return a cPlayerInfo object that will be created based on the contents of "message".. the commented lines were stuff that doesnt work... and the lines below that dont work either

Code:
 
cPlayerInfo cParser::Decipher(char message[])
{
std::string s = message;
std::string sub = s.substr(0, 4);
std::cout << sub;
//cPlayerInfo fakePlayer;
//fakePlayer.id = NULL;
cPlayerInfo fake;
fake.id = NULL;
return fake;
}
 


thanks in advance OldPendant (you usually answer my cpp questions haha)..

anyone else feel free to answer too :)
 
Old June 10th, 2009, 12:46 PM
Friend of Wrox
 
Join Date: Mar 2008
Posts: 133
Thanks: 15
Thanked 1 Time in 1 Post
Send a message via ICQ to iceman90289 Send a message via AIM to iceman90289
Default

i got it fixed. it turns out that changing all the functions like this:

Code:
<class> <fname>(plist)
to

Code:
<class>* <fname>(plist)
anyways, thank you all for reading this, at the time of looking there was 37 views on this thread.





Similar Threads
Thread Thread Starter Forum Replies Last Post
IM STUCK!!! cagaroos BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 10 December 31st, 2008 06:22 PM
im new with c# i need help tunisiano C# 7 February 17th, 2007 04:54 AM
im new here and i need ur help.... momoi Beginning VB 6 2 January 30th, 2006 11:44 PM
history.back or hitting the back button won't work lian_a Classic ASP Basics 4 July 29th, 2004 12:14 AM
Im new in P2PForum darkdog BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 June 20th, 2003 01:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.