Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Querry!! Pin
Rajesh R Subramanian29-Jun-09 22:35
professionalRajesh R Subramanian29-Jun-09 22:35 
AnswerRe: Querry!! Pin
Aric Wang29-Jun-09 23:27
Aric Wang29-Jun-09 23:27 
AnswerRe: Querry!! Pin
David Crow30-Jun-09 3:36
David Crow30-Jun-09 3:36 
Questionhow to set an image as background for dialog box or form Pin
suthakar5629-Jun-09 18:56
suthakar5629-Jun-09 18:56 
GeneralRe: how to set an image as background for dialog box or form Pin
Michael Dunn29-Jun-09 19:01
sitebuilderMichael Dunn29-Jun-09 19:01 
GeneralRe: how to set an image as background for dialog box or form Pin
«_Superman_»29-Jun-09 21:40
professional«_Superman_»29-Jun-09 21:40 
AnswerRe: how to set an image as background for dialog box or form Pin
zhyp_20829-Jun-09 20:27
zhyp_20829-Jun-09 20:27 
QuestionSimple Unresolved External Symbol error Pin
Member 470553829-Jun-09 17:33
Member 470553829-Jun-09 17:33 
Hi,

I am wondering if anyone can help me out, i have created the following class and when i include it in another class it compiles fine, but when i try to create an object of it i get the following error:
1>Stocks.obj : error LNK2019: unresolved external symbol "public: __thiscall CStringParser::CStringParser(void)" (??0CStringParser@@QAE@XZ) referenced in function "public: __thiscall Stocks::Stocks(void)" (??0Stocks@@QAE@XZ)
1>Stocks.obj : error LNK2019: unresolved external symbol "public: __thiscall CStringParser::~CStringParser(void)" (??1CStringParser@@QAE@XZ) referenced in function "public: __thiscall Stocks::~Stocks(void)" (??1Stocks@@QAE@XZ)


In the file im calling this from i include the StringParser.h but still get this unresolved external symbol. Previously i have been including the .cpp files and it worked, but I want to learn how to do it properly using only header files. I am using Visual Studio 2008

Thanks in advance

//StringParser.h
#pragma once

/////////////////////////////////////////////////////////////////////////////////////////
//Name:			CStringParser
//Author:		Michal Ciechan
//Date:			2009-06-30
//Features:		A CString parser to parse a string seperated by a 
//				character(c) into a vector
//Usage:		call ParseString method with 2 parameters, first being the string
//				etc("Ping&TestPing&value 3") and the second being the seperator
//				etc("&")
/////////////////////////////////////////////////////////////////////////////////////////

#include <string>
#include <vector>
class CStringParser 
{
public:
	// Constructor
	CStringParser::CStringParser();
	// Destructor
	CStringParser::~CStringParser();
	// Functions
	std::vector<CString> CStringParser::ParseString(CString s, CString c);
};
//StringParser.cpp
#pragma once
#include "StringParser.h"
#include <string>
#include <vector>


// Constructor
CStringParser::CStringParser()
{
}
// Destructor
CStringParser::~CStringParser()
{
}
//Functions
std::vector<CString> CStringParser::ParseString(CString s, CString c /*Seperator*/)
{
............
}

// Test.h
#pragma once
#include "StringParser.h"

class Test
{
public:
	Test(void);
	~Test(void);
private:
	CStringParser sp;
};

AnswerRe: Simple Unresolved External Symbol error Pin
Nibu babu thomas29-Jun-09 18:22
Nibu babu thomas29-Jun-09 18:22 
AnswerRe: Simple Unresolved External Symbol error Pin
«_Superman_»29-Jun-09 18:44
professional«_Superman_»29-Jun-09 18:44 
GeneralRe: Simple Unresolved External Symbol error Pin
Member 470553830-Jun-09 2:17
Member 470553830-Jun-09 2:17 
GeneralRe: Simple Unresolved External Symbol error Pin
«_Superman_»30-Jun-09 2:53
professional«_Superman_»30-Jun-09 2:53 
GeneralRe: Simple Unresolved External Symbol error Pin
Member 470553830-Jun-09 6:06
Member 470553830-Jun-09 6:06 
GeneralRe: Simple Unresolved External Symbol error Pin
«_Superman_»30-Jun-09 16:37
professional«_Superman_»30-Jun-09 16:37 
AnswerRe: Simple Unresolved External Symbol error Pin
Pavan_Putra29-Jun-09 19:48
Pavan_Putra29-Jun-09 19:48 
GeneralRe: Simple Unresolved External Symbol error Pin
Cedric Moonen29-Jun-09 20:41
Cedric Moonen29-Jun-09 20:41 
AnswerRe: Simple Unresolved External Symbol error Pin
Stuart Dootson29-Jun-09 22:23
professionalStuart Dootson29-Jun-09 22:23 
GeneralRe: Simple Unresolved External Symbol error Pin
Member 470553830-Jun-09 5:59
Member 470553830-Jun-09 5:59 
GeneralRe: Simple Unresolved External Symbol error Pin
Stuart Dootson30-Jun-09 6:04
professionalStuart Dootson30-Jun-09 6:04 
AnswerRe: Simple Unresolved External Symbol error Pin
Aric Wang29-Jun-09 23:30
Aric Wang29-Jun-09 23:30 
QuestionCan a data from a file be directly stored in a structure in C? Pin
Razanust29-Jun-09 16:25
Razanust29-Jun-09 16:25 
AnswerRe: Can a data from a file be directly stored in a structure in C? Pin
Harsh Shankar29-Jun-09 18:43
Harsh Shankar29-Jun-09 18:43 
AnswerRe: Can a data from a file be directly stored in a structure in C? Pin
CPallini29-Jun-09 21:40
mveCPallini29-Jun-09 21:40 
QuestionC++ pointers and DLL linking Pin
dAvId_BotMan29-Jun-09 16:06
dAvId_BotMan29-Jun-09 16:06 
AnswerRe: C++ pointers and DLL linking Pin
«_Superman_»29-Jun-09 18:54
professional«_Superman_»29-Jun-09 18:54 

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.