String Constructor (Char, Int32) not working?...

G

Guest

Initializes a new instance of the String class to the value indicated by a
specified Unicode character repeated a specified number of times.

String Constructor (Char, Int32)

Why am I getting these errors:
1) C2078: too many initializers and
2) C2440: 'initializing' : cannot convert from 'int' to 'System::String __gc
*'

when I use this constructor to initialize my string?
System::String *tRs('-',13);
 
C

Clive Dixon

If you look further down the documentation at the example, don't you have to
prefix your character with 'L'

System::String *tRs(L'-',13);

?
 
G

Guest

In my help doc's I don't have an example and I am developing in MC++. Is
there an updated .NET 2003 help?
 
G

Guest

My help doc's are out of date compared to the online doc's. I saw the
example. Thanks!....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top