Click here to Skip to main content
15,916,042 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Resizing Bitmaps without clipping Pin
JWood13-Sep-03 16:11
JWood13-Sep-03 16:11 
GeneralReading Registry Pin
K7magi13-Sep-03 15:59
K7magi13-Sep-03 15:59 
GeneralRe: Reading Registry Pin
Michael Dunn13-Sep-03 17:31
sitebuilderMichael Dunn13-Sep-03 17:31 
Generalquestion about api hook Pin
Jay Wang13-Sep-03 15:07
Jay Wang13-Sep-03 15:07 
GeneralCouple of questions about toolbars Pin
Xakep13-Sep-03 10:48
Xakep13-Sep-03 10:48 
Generalvoid functions in g++ Pin
keegan13-Sep-03 10:06
keegan13-Sep-03 10:06 
GeneralRe: void functions in g++ Pin
Johnny ²13-Sep-03 10:42
Johnny ²13-Sep-03 10:42 
GeneralRe: void functions in g++ Pin
keegan13-Sep-03 11:14
keegan13-Sep-03 11:14 
Here is the error

g++ proj01.cpp
Undefined                       first referenced
 symbol                             in file
Player::SetFirst(std::string)       /var/tmp/ccZLDByc.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status


Here is (part of) my .h file:

#include <string>
#include <vector>
//#include "playerstat.h"

using namespace std;

class Player
{
	public:
	string GetFirst();
	void SetFirst(string first);



	private:
	string FirstName;
				
};


Here is my .cpp file for the header...

#include "player.h"
#include <string>
using namespace std;

string Player::GetFirst()
{

	return FirstName;

};
void Player::SetFirst(string first)
{
	FirstName = first;

};


this only happens with void functions. In GetFirst(), i return a string, and it works fine.

*.*
cin >> knowledge;
GeneralRe: void functions in g++ Pin
Nick Parker13-Sep-03 11:56
protectorNick Parker13-Sep-03 11:56 
GeneralRe: void functions in g++ Pin
ZoogieZork13-Sep-03 11:57
ZoogieZork13-Sep-03 11:57 
GeneralRe: void functions in g++ Pin
keegan13-Sep-03 12:11
keegan13-Sep-03 12:11 
GeneralRe: void functions in g++ Pin
ZoogieZork13-Sep-03 12:32
ZoogieZork13-Sep-03 12:32 
GeneralRe: void functions in g++ Pin
keegan13-Sep-03 12:53
keegan13-Sep-03 12:53 
GeneralOpen &amp; Read &amp; Write in USB port Pin
asd175313-Sep-03 8:23
asd175313-Sep-03 8:23 
GeneralRe: Open &amp; Read &amp; Write in USB port Pin
Felix Gartsman13-Sep-03 8:33
Felix Gartsman13-Sep-03 8:33 
GeneralRe: Open &amp; Read &amp; Write in USB port Pin
asd175313-Sep-03 8:38
asd175313-Sep-03 8:38 
GeneralRe: Open &amp; Read &amp; Write in USB port Pin
Felix Gartsman13-Sep-03 23:16
Felix Gartsman13-Sep-03 23:16 
GeneralMFC-a windows paint example, how do i do the text option Pin
lxxrya00113-Sep-03 8:22
lxxrya00113-Sep-03 8:22 
GeneralRe: MFC-a windows paint example, how do i do the text option Pin
Steve Hopkins13-Sep-03 9:41
Steve Hopkins13-Sep-03 9:41 
GeneralAppend one string at begin of another Pin
skaanji13-Sep-03 7:34
skaanji13-Sep-03 7:34 
GeneralRe: Append one string at begin of another Pin
Scozturk13-Sep-03 8:09
professionalScozturk13-Sep-03 8:09 
GeneralRe: Append one string at begin of another Pin
skaanji13-Sep-03 8:34
skaanji13-Sep-03 8:34 
GeneralRe: Append one string at begin of another Pin
JohnJ13-Sep-03 9:32
JohnJ13-Sep-03 9:32 
GeneralRe: Append one string at begin of another Pin
Michael Dunn13-Sep-03 17:43
sitebuilderMichael Dunn13-Sep-03 17:43 
GeneralRe: Append one string at begin of another Pin
ZoogieZork13-Sep-03 9:32
ZoogieZork13-Sep-03 9:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.