Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CTreeview question Pin
monsieur_jj29-Jun-08 17:45
monsieur_jj29-Jun-08 17:45 
GeneralRe: CTreeview question Pin
Naveen29-Jun-08 18:34
Naveen29-Jun-08 18:34 
GeneralRe: CTreeview question Pin
monsieur_jj29-Jun-08 19:30
monsieur_jj29-Jun-08 19:30 
GeneralRe: CTreeview question Pin
Naveen29-Jun-08 19:33
Naveen29-Jun-08 19:33 
GeneralRe: CTreeview question Pin
monsieur_jj29-Jun-08 21:25
monsieur_jj29-Jun-08 21:25 
GeneralRe: CTreeview question Pin
Naveen29-Jun-08 21:48
Naveen29-Jun-08 21:48 
AnswerRe: CTreeview question Pin
Iain Clarke, Warrior Programmer30-Jun-08 2:20
Iain Clarke, Warrior Programmer30-Jun-08 2:20 
QuestionLNK2005 Error... Pin
Rizean29-Jun-08 13:52
Rizean29-Jun-08 13:52 
Hello all,
While working on an ungraded project for class I came accross a LNK2005 Error which while I have been able to work around, I would like to know how to do it correctly.

The project is to create an employee data base that has an employee class with child classes. That's the jest of the project.

Employee - base class
-Researcher - child class
-Engineer - child class
-Manager - child class

Now the above four classes all include employee_template.h which defines a template function called void _getInput(std::string& message, T& result). Now the file containing function _getInput include stream_flush.h. Inside of stream_flush includes a function called flush_stream.

The problem I am running into is that Employee and it's three child classes all include "employee_template.h" to get the function _getInput which include stream_flush.h to get the function flush_stream which is what generates the errors.

engineer.obj : error LNK2005: "void __cdecl flush_istream(...) already defined in employee.obj

I was able to get around the error by using the linker command line option: /FORCE:MULTIPLE but I am assuming this is not the right way.
AnswerRe: LNK2005 Error... Pin
Stephen Hewitt29-Jun-08 15:14
Stephen Hewitt29-Jun-08 15:14 
GeneralRe: LNK2005 Error... Pin
Rizean29-Jun-08 15:24
Rizean29-Jun-08 15:24 
QuestionRe: LNK2005 Error... Pin
Mark Salsbery29-Jun-08 15:17
Mark Salsbery29-Jun-08 15:17 
AnswerRe: LNK2005 Error... Pin
Rizean29-Jun-08 15:45
Rizean29-Jun-08 15:45 
QuestionRe: LNK2005 Error... Pin
Mark Salsbery30-Jun-08 6:38
Mark Salsbery30-Jun-08 6:38 
AnswerRe: LNK2005 Error... Pin
Rizean30-Jun-08 13:54
Rizean30-Jun-08 13:54 
QuestionWhy does the line "delete [] player_data_array;" give a Debug Error Pin
tippex129-Jun-08 9:30
tippex129-Jun-08 9:30 
QuestionRe: Why does the line "delete [] player_data_array;" give a Debug Error Pin
Mark Salsbery29-Jun-08 9:46
Mark Salsbery29-Jun-08 9:46 
AnswerRe: Why does the line "delete [] player_data_array;" give a Debug Error Pin
tippex129-Jun-08 10:08
tippex129-Jun-08 10:08 
GeneralRe: Why does the line "delete [] player_data_array;" give a Debug Error [modified] Pin
Mark Salsbery29-Jun-08 10:15
Mark Salsbery29-Jun-08 10:15 
GeneralRe: Why does the line "delete [] player_data_array;" give a Debug Error Pin
tippex129-Jun-08 11:29
tippex129-Jun-08 11:29 
GeneralRe: Why does the line "delete [] player_data_array;" give a Debug Error Pin
Mark Salsbery29-Jun-08 11:49
Mark Salsbery29-Jun-08 11:49 
GeneralRe: Why does the line "delete [] player_data_array;" give a Debug Error Pin
tippex11-Jul-08 3:27
tippex11-Jul-08 3:27 
GeneralRe: Why does the line "delete [] player_data_array;" give a Debug Error Pin
Mark Salsbery1-Jul-08 6:35
Mark Salsbery1-Jul-08 6:35 
GeneralRe: Why does the line "delete [] player_data_array;" give a Debug Error Pin
Stephen Hewitt29-Jun-08 15:15
Stephen Hewitt29-Jun-08 15:15 
QuestionIssue with calling the MessageBox Windows API from a DLL Pin
jbf15429-Jun-08 8:19
jbf15429-Jun-08 8:19 
AnswerRe: Issue with calling the MessageBox Windows API from a DLL Pin
dave_mm04-Dec-08 10:03
dave_mm04-Dec-08 10:03 

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.