Google Groups Home
Help | Sign in
Use with VS8?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
break  
View profile
 More options Oct 8 2007, 6:17 am
From: break <h_mir...@hotmail.com>
Date: Mon, 08 Oct 2007 03:17:58 -0700
Local: Mon, Oct 8 2007 6:17 am
Subject: Use with VS8?
Hello,
i use this framework with VS8, and if i include ootl_map.hpp i recive
this error:
 C2226: syntax error : unexpected type 'T'
in file ootl_misc.hpp line 116 by sourcecode:

template<typename T>
const T& min(const T& x, const T& y) { // <-- this line with error!
  return x < y ? x : y;

}

template<typename T>
const T& max(const T& x, const T& y) {
  return x > y ? x : y;

}

can someone help me to solve this?

Thanks for any help!
regards
break


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
leo_yvelines  
View profile
 More options Oct 9 2007, 6:02 am
From: leo_yvelines <eric.legr...@orange.fr>
Date: Tue, 09 Oct 2007 03:02:17 -0700
Local: Tues, Oct 9 2007 6:02 am
Subject: Re: Use with VS8?
Your problem comes from the fact that Microsoft VS already defines min
and max as macros. Therefore you cannot use these names as function
names. You should rather use tmin and tmax or anything else.

Eric

break a écrit :


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
~MyXa~  
View profile
 More options Oct 9 2007, 6:38 am
From: ~MyXa~ <Mikhail.Strelni...@gmail.com>
Date: Tue, 09 Oct 2007 03:38:02 -0700
Local: Tues, Oct 9 2007 6:38 am
Subject: Re: Use with VS8?

or add #define NOMINMAX above the #include <windows.h>

On Oct 9, 2:02 pm, leo_yvelines <eric.legr...@orange.fr> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
break  
View profile
 More options Oct 9 2007, 7:43 am
From: break <h_mir...@hotmail.com>
Date: Tue, 09 Oct 2007 04:43:22 -0700
Local: Tues, Oct 9 2007 7:43 am
Subject: Re: Use with VS8?
Hello,
yes i change the names already, but thanks!
Can you give me a sample how to use hash_map?
I have an error when i want to define my map variable!
Here is a sample code:
[code]
// i have a own class derived from CObject called CMyObject
ootl::hash_map<CString,CMyObject>myhashmap; // error C2512:
'ootl::hash_map<Key,Data>' : no appropriate default constructor
available
[/code]

How to create a varable from hash_map?
Thansk in advance!
regards
break;

On 9 Okt., 12:02, leo_yvelines <eric.legr...@orange.fr> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
break  
View profile
 More options Oct 9 2007, 7:46 am
From: break <h_mir...@hotmail.com>
Date: Tue, 09 Oct 2007 04:46:14 -0700
Local: Tues, Oct 9 2007 7:46 am
Subject: Re: Use with VS8?
Hello,
thank you for sugestion!

regards
break

On 9 Okt., 12:38, ~MyXa~ <Mikhail.Strelni...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google