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

C / C++ / MFC

 
JokeRe: how to include another sort into this program Pin
Mark Salsbery20-Sep-07 9:34
Mark Salsbery20-Sep-07 9:34 
GeneralRe: how to include another sort into this program Pin
snoop8220-Sep-07 9:35
snoop8220-Sep-07 9:35 
GeneralRe: how to include another sort into this program Pin
Cedric Moonen20-Sep-07 9:37
Cedric Moonen20-Sep-07 9:37 
GeneralRe: how to include another sort into this program Pin
Dave Kreskowiak20-Sep-07 12:41
mveDave Kreskowiak20-Sep-07 12:41 
AnswerRe: how to include another sort into this program Pin
toxcct20-Sep-07 20:53
toxcct20-Sep-07 20:53 
QuestionSQLPassThrough??? Pin
littleGreenDude20-Sep-07 7:49
littleGreenDude20-Sep-07 7:49 
AnswerRe: SQLPassThrough??? Pin
Mark Salsbery20-Sep-07 10:19
Mark Salsbery20-Sep-07 10:19 
QuestionMFC and iostream Pin
xjonil20-Sep-07 7:20
xjonil20-Sep-07 7:20 
I'm writing a logging program for virtual COM port connected sensors which is later on going to communicate with a framegrabber for syncronisations purposes. For simplicity I wanted to run the program in a command window but MFC and iostream seems to have a hard time cooperating. I need access virtual serial ports and later on threading for the framegrabber (video input).

First: Is it a dead end to use iostream and a command window for my needs? Do the MFC components refuse running in a command window?

Second: If iostream and MFC should work together (I don't have any previous experience with MFC so I barely know what I'm speaking about) how do I get around my linking problems? I get the evil LNK2005 error, eg.:

nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcpmt.lib(newop.obj)

when I'm linking. It seems to be the "new" and "delete" operators which are the problem. I've already looked through the MS article on the topic (ID : 148652) but I still can't figure out how to get around it.

#include <afx.h>
#include <iostream>

,plus an almost empty main, gives me the error. What have I gotten wrong?
I'm using MS Visual Studio .NET 2003.
AnswerRe: MFC and iostream Pin
jhwurmbach20-Sep-07 7:28
jhwurmbach20-Sep-07 7:28 
GeneralRe: MFC and iostream Pin
xjonil20-Sep-07 8:58
xjonil20-Sep-07 8:58 
AnswerRe: MFC and iostream Pin
DevMentor.org20-Sep-07 9:46
DevMentor.org20-Sep-07 9:46 
GeneralRe: MFC and iostream Pin
xjonil20-Sep-07 20:11
xjonil20-Sep-07 20:11 
GeneralRe: MFC and iostream Pin
DevMentor.org20-Sep-07 20:20
DevMentor.org20-Sep-07 20:20 
QuestionGDI+ Pen Alignment Pin
bob1697220-Sep-07 7:04
bob1697220-Sep-07 7:04 
AnswerRe: GDI+ Pen Alignment Pin
Nathan Holt at EMOM20-Sep-07 9:10
Nathan Holt at EMOM20-Sep-07 9:10 
GeneralRe: GDI+ Pen Alignment Pin
bob1697220-Sep-07 9:21
bob1697220-Sep-07 9:21 
Questiondifference b/w RS232 and RS422 Pin
sudheee20-Sep-07 6:56
sudheee20-Sep-07 6:56 
AnswerRe: difference b/w RS232 and RS422 Pin
xjonil20-Sep-07 7:32
xjonil20-Sep-07 7:32 
AnswerRe: difference b/w RS232 and RS422 Pin
jeron120-Sep-07 9:41
jeron120-Sep-07 9:41 
QuestionDateDiff in C++ Pin
rweworld20-Sep-07 6:23
rweworld20-Sep-07 6:23 
AnswerRe: DateDiff in C++ Pin
nbugalia20-Sep-07 6:44
nbugalia20-Sep-07 6:44 
AnswerRe: DateDiff in C++ Pin
bob1697220-Sep-07 9:23
bob1697220-Sep-07 9:23 
Questionmergesort and insertion sort problem.. Pin
makaveli_0720-Sep-07 6:00
makaveli_0720-Sep-07 6:00 
AnswerRe: mergesort and insertion sort problem.. Pin
Iain Clarke, Warrior Programmer20-Sep-07 6:40
Iain Clarke, Warrior Programmer20-Sep-07 6:40 
GeneralRe: mergesort and insertion sort problem.. Pin
makaveli_0720-Sep-07 7:04
makaveli_0720-Sep-07 7:04 

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.