Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > cast multimap values

Reply
Thread Tools

cast multimap values

 
 
scrat_here@yahoo.com
Guest
Posts: n/a
 
      07-28-2013
Hi
How to solve the error:

error: invalid cast from type ‘std:air<const std::basic_string<char>, std::vector<Procedure*> >’ to type ‘const char*’

Many thanks
 
Reply With Quote
 
 
 
 
Öö Tiib
Guest
Posts: n/a
 
      07-28-2013
On Sunday, 28 July 2013 09:34:32 UTC+3, (E-Mail Removed) wrote:
> How to solve the error:
>
> error: invalid cast from type ‘std:air<const std::basic_string<char>,
> std::vector<Procedure*> >’ to type ‘const char*’


By not doing what it complains about. For example you attempt to supply
objects of type 'std:air<std::string,std::vector<Procedure*> >' as
arguments to a function that expects 'const char*' as parameter. It is
illegal to do so and so compiler refuses to compile it.
 
Reply With Quote
 
 
 
 
scrat_here@yahoo.com
Guest
Posts: n/a
 
      07-28-2013
I can read the error myself...
 
Reply With Quote
 
scrat_here@yahoo.com
Guest
Posts: n/a
 
      07-28-2013
I can read the error but look for a cast.
 
Reply With Quote
 
Öö Tiib
Guest
Posts: n/a
 
      07-28-2013
On Sunday, 28 July 2013 13:01:59 UTC+3, (E-Mail Removed) wrote:
> I can read the error but look for a cast.


Such a cast is nonsense so it is made illegal in C++. Can you convert
your keyboard and mouse into IP address of your PC? No? Why? Because
it is nonsense. What you actually try to do we do not know, because
you do not tell nor show.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the result of valid dynamic cast always equal to the result ofcorrespondent static cast? Pavel C++ 7 09-18-2010 11:35 PM
error C2440: 'return' : cannot convert from 'const char *' to 'const unsigned short *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Abhijit Bhadra C++ 2 12-01-2004 04:43 PM
malloc - to cast or not to cast, that is the question... EvilRix C Programming 8 02-14-2004 12:08 PM
to cast or not to cast malloc ? MSG C Programming 38 02-10-2004 03:13 PM
Multimap Håvard Kverneland Java 1 02-10-2004 12:07 PM



Advertisments