Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > string class question ....

Reply
Thread Tools

string class question ....

 
 
JustSomeGuy
Guest
Posts: n/a
 
      12-09-2003
Sorry must repost in this thread...

This comiles in gcc but not on vc++
Error message is something like....
structs.h(171) : error C2440: 'initializing' : cannot convert from 'class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >' to 'atype'


typedef struct
{
string a;
string b;
} atype;

string ABC = ("123");
string DEF = ("456");

atype mylist[] =
{
{"ABC", ABC},
{"DEF", DEF}
};



 
Reply With Quote
 
 
 
 
Gianni Mariani
Guest
Posts: n/a
 
      12-09-2003
JustSomeGuy wrote:
> Sorry must repost in this thread...
>
> This comiles in gcc but not on vc++


vc++ is wrong.

Are you using VC7

 
Reply With Quote
 
 
 
 
JustSomeGuy
Guest
Posts: n/a
 
      12-09-2003
"Gianni Mariani" <(E-Mail Removed)> wrote in message
news:br3kvr$(E-Mail Removed)...
> JustSomeGuy wrote:
> > Sorry must repost in this thread...
> >
> > This comiles in gcc but not on vc++

>
> vc++ is wrong.
>
> Are you using VC7
>


No 6.0


 
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
Class A contains class B, class B points to class A Joseph Turian C++ 5 12-30-2005 03:24 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
A parameterized class (i.e. template class / class template) is not a class? christopher diggins C++ 16 05-04-2005 12:26 AM
Generic class literals - e.g,, Class<Map<String, Integer>>.class Purush Java 4 04-13-2005 08:40 PM
Re: String.replaceAll(String regex, String replacement) question Mladen Adamovic Java 0 12-04-2003 04:40 PM



Advertisments