Click here to Skip to main content
16,004,806 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Arrays Pin
David Crow24-Mar-09 2:41
David Crow24-Mar-09 2:41 
GeneralRe: Arrays Pin
CPallini24-Mar-09 1:43
mveCPallini24-Mar-09 1:43 
GeneralRe: Arrays Pin
Eytukan24-Mar-09 1:53
Eytukan24-Mar-09 1:53 
GeneralRe: Arrays Pin
CPallini24-Mar-09 3:22
mveCPallini24-Mar-09 3:22 
QuestionODBC database problem Pin
Deepu Antony24-Mar-09 0:55
Deepu Antony24-Mar-09 0:55 
QuestionRe: ODBC database problem Pin
David Crow24-Mar-09 2:48
David Crow24-Mar-09 2:48 
AnswerRe: ODBC database problem Pin
Deepu Antony24-Mar-09 3:23
Deepu Antony24-Mar-09 3:23 
Questionerror LNK2001: unresolved external symbol Pin
ytubis24-Mar-09 0:26
ytubis24-Mar-09 0:26 
Hi!
I need help with this problem, I got this error before but I managed to solve.
But now I have a case with the virtual function.
The source looks like this(after the code I continued writing):

#include "stdafx.h"
#ifndef EMPTRANSH
#define EMPTRANSH
#include "Global.h"
#include "iostream"
#include "string"
using namespace std;

class EmpTrans
{
private:
int id;
char emp_name[MAXNAMELENGTH];
employee_status emp_st;
int salary;
salary_type sal_st;
char deal_date[DATELENGTH];
public:
EmpTrans();
static void Open();
static void Close();
void ReadNext();
virtual void Apply();

void UpdateId(int i){id = i;}
void UpdateSalary(int s){salary = s;}
void UpdateEmployeeStatus(employee_status es){emp_st = es;}
void UpdateSalaryType(salary_type ss){sal_st = ss;}
void UpdateDate(char * d){strcpy(deal_date,d);}
void UpdateEmployeeName(char en){emp_name[0] = en;}
int GetId(){return id;}
char * GetEmployeeName(){return emp_name;}
employee_status GetEmployeeStatus(){return emp_st;}
int GetSalary(){return salary;}
salary_type GetSalaryType(){return sal_st;}
char * GetDate(){return deal_date;}
};
#endif

class EmpTransAdd : public EmpTrans
{
public:
void Apply();
};

class EmpTransChange : public EmpTrans
{
public:
void Apply();
};

class EmpTransDelete : public EmpTrans
{
public:
void Apply();
};

When I compile and link this source I get the error,
when I remove the virtaul function from the Apply function, everything works fine.
What is the problem?
Do I need to take out the other classes from the source? or to include them inside the ifdef?

Thanks Smile | :)
AnswerRe: error LNK2001: unresolved external symbol Pin
Cedric Moonen24-Mar-09 0:35
Cedric Moonen24-Mar-09 0:35 
AnswerRe: error LNK2001: unresolved external symbol [modified] Pin
S p k 52124-Mar-09 0:37
S p k 52124-Mar-09 0:37 
AnswerRe: error LNK2001: unresolved external symbol Pin
Eytukan24-Mar-09 0:40
Eytukan24-Mar-09 0:40 
Questionstring append with \ symbol Pin
Thilek23-Mar-09 23:23
Thilek23-Mar-09 23:23 
AnswerRe: string append with \ symbol Pin
Eytukan23-Mar-09 23:33
Eytukan23-Mar-09 23:33 
GeneralRe: string append with \ symbol Pin
Thilek23-Mar-09 23:40
Thilek23-Mar-09 23:40 
QuestionRe: string append with \ symbol Pin
Maxwell Chen23-Mar-09 23:51
Maxwell Chen23-Mar-09 23:51 
AnswerRe: string append with \ symbol Pin
Thilek23-Mar-09 23:58
Thilek23-Mar-09 23:58 
GeneralRe: string append with \ symbol Pin
David Crow24-Mar-09 2:51
David Crow24-Mar-09 2:51 
AnswerRe: string append with \ symbol Pin
KarstenK24-Mar-09 0:03
mveKarstenK24-Mar-09 0:03 
GeneralRe: string append with \ symbol Pin
Thilek24-Mar-09 0:34
Thilek24-Mar-09 0:34 
GeneralRe: string append with \ symbol Pin
Thilek24-Mar-09 3:14
Thilek24-Mar-09 3:14 
QuestionWriting a callback function? Pin
Maxwell Chen23-Mar-09 22:56
Maxwell Chen23-Mar-09 22:56 
AnswerRe: Writing a callback function? Pin
Eytukan23-Mar-09 23:06
Eytukan23-Mar-09 23:06 
GeneralRe: Writing a callback function? Pin
Maxwell Chen23-Mar-09 23:10
Maxwell Chen23-Mar-09 23:10 
GeneralRe: Writing a callback function? Pin
Eytukan23-Mar-09 23:17
Eytukan23-Mar-09 23:17 
AnswerRe: Writing a callback function? Pin
CPallini23-Mar-09 23:09
mveCPallini23-Mar-09 23:09 

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.