Convert String to Int (C++ .NET)

Convert String to Int (C++ .NET)

Post by JTX on Sat Jan 10, 2009 5:51 am
([msg=15857]see Convert String to Int (C++ .NET)[/msg])

Hi i am having trouble converting a string to int. As the string is a Net Class Member i can not use atoi() or ToInt32().

Any idea how to make this using C++/CLI?

Thanks
User avatar
JTX
New User
New User
 
Posts: 10
Joined: Wed Jan 07, 2009 3:29 pm
Blog: View Blog (0)


Re: Convert String to Int (C++ .NET)

Post by BhaaL on Sat Jan 10, 2009 6:21 am
([msg=15858]see Re: Convert String to Int (C++ .NET)[/msg])

Convert.ToInt32().

Should be available of some sorts in C++/CLI aswell, probably check the MSDN for info.
Edit: Convert::ToInt32()
BhaaL
Poster
Poster
 
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)


Re: Convert String to Int (C++ .NET)

Post by JTX on Sat Jan 10, 2009 9:07 am
([msg=15864]see Re: Convert String to Int (C++ .NET)[/msg])

BhaaL thanks for your help during the chat. Here is the code for the case some one have the same problem:

summe[k] = System::Convert::ToInt32(Bar[k]); //where Bar is a string_array
User avatar
JTX
New User
New User
 
Posts: 10
Joined: Wed Jan 07, 2009 3:29 pm
Blog: View Blog (0)



Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests

cron