Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can't compile STL into Win32 Console App

Posted on 2004-04-01
2
Medium Priority
?
241 Views
Last Modified: 2013-11-20
Hi.  I am trying to add the std::map and std::string types to my project.  All I did was add the following to the top of one of my header files:

#include <string>
#include <map>
using namespace std;

I get hundereds of errors and warning. Some of the errors look like:

warning C4002: too many actual parameters for macro 'move'
c:\program files\microsoft visual studio\vc98\include\iosfwd(110) : error C2061: syntax error : identifier 'stdscr'
        c:\program files\microsoft visual studio\vc98\include\iosfwd(135) : see reference to class template instantiation 'std::char_traits<_E>' being compiled
c:\program files\microsoft visual studio\vc98\include\iosfwd(159) : warning C4002: too many actual parameters for macro 'move'
c:\program files\microsoft visual studio\vc98\include\iosfwd(159) : error C2061: syntax error : identifier 'stdscr'
c:\program files\microsoft visual studio\vc98\include\iosfwd(198) : warning C4002: too many actual parameters for macro 'move'
c:\program files\microsoft visual studio\vc98\include\iosfwd(198) : error C2061: syntax error : identifier 'stdscr'
etc................

Does anybody have any idea why this would happen?  Thanks.
0
Comment
Question by:mromeo
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 800 total points
ID: 10733425
Mixing MFC and STL can be a major headache. See http://support.microsoft.com/default.aspx?scid=kb;en-us;143207 ("PRB: Common Problems When Using STL with STD Namespace") and the ALLINONE sample at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample/html/_sample_com_allinone.asp 
0
 

Author Comment

by:mromeo
ID: 10734843
Ok.. I found the problem.  It was the order in which I was including things.  I was including some PDCurses header files and I needed to include those after the STL includes.  Thanks for your help
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question