473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

compilation errors in VC++ with map, but works fine in linux

map<float,int> m;
typedef map<float,int>::const_iterator iter;

This declaration works fine in linux and the program also runs fine.

But in VC++:

error C2653: 'map<float,int,struct std::less<float>,class
std::allocator<int> >' : is not a class or namespace name.

Can anyone throw light how to fix this error.

Thanks,
Murali.
Jul 19 '05 #1
1 2475
murali wrote:
But in VC++:

error C2653: 'map<float,int,struct std::less<float>,class
std::allocator<int> >' : is not a class or namespace name.


typedef std::map<float,int>::const_iterator iter;

g++ is too forgiving (which sometimes means "sloppy").

--
Phlip
http://www.c2.com/cgi/wiki?TestFirstUserInterfaces

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
0
by: Mythran | last post by:
I'm have 2 primary errors that seem to occur. 1.) In my ASP.Net application, I have 3 libraries (BLL, DAL, and Schema) that are used for the 4th and 5th UI libraries. All of the dependant...
1
by: J.A. | last post by:
Hi, I'm trying to use the CSharpCompilerProvider to dynamically compile some code. The test console app works fine but I get this error when using the same code in an ASP.NET app: error CS1619:...
1
by: Arsalan Ahmad | last post by:
Hi all, I am trying to compile some source files using makefile. While compiling I am getting errors as shown below. Any idea how can I solve this problem. I believe I need to add some...
1
by: vasant63 | last post by:
Hi, This is the compilation errors which I am getting when I compiling the code with VC++ 6.0. The same code is getting compiled in Linux OS. I would like to know how this compiler error can be...
1
by: akjohn | last post by:
My code compiles fine using VC++ 2005 and also with g++/gcc 3.4.2 (mingw...which came with the bloodshed dev c++ ide). But it only the vc++ build works correctly, the gcc exe starts but...
4
by: marathoner | last post by:
I tried your advice, and replaced "ifstream" with "std::ifstream". I also replaced instances of "ofstream" with "std::ofstream". Those syntax errors were resolved. When I added "std" to the...
8
by: ftjonsson | last post by:
hello, I was wondering if anyone could tips me on what I am doing wrong when writing the following code: #include <iostream> using namespace std; int main () {
3
by: saneman | last post by:
I have some code that compiles fine with g++ (gnu c++ compiler for linux): #include <math_types.h> int main() { //graphics::MyMathTypes::vector3_type v1; typedef graphics::MyMathTypes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.