Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can't compile STL into Win32 Console App

Posted on 2004-04-01
2
Medium Priority
?
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 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