Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
net.cpp AND what on earth is vector<string>::const_ite
06-06-2006, 12:49 PM,
#7
 
The "right way" to convert a string to an integer in C++ would be something like this:
Code:
string a = "55";
ostringstream s;
s.str( a );
int j;
s >> j;
To get the string out of the iterator just dereference it as I demonstrated before. You can look for some other examples of string conversions in the code, I think I recently put something like what's above in settings.cpp.
Reply


Messages In This Thread
[No subject] - by thelusiv - 06-05-2006, 05:41 PM
[No subject] - by joevenzon_phpbb2_import3 - 06-05-2006, 09:44 PM
[No subject] - by thelusiv - 06-06-2006, 12:36 AM
[No subject] - by nael - 06-06-2006, 09:41 AM
[No subject] - by thelusiv - 06-06-2006, 12:49 PM
[No subject] - by joevenzon_phpbb2_import3 - 06-06-2006, 08:02 PM
[No subject] - by nael - 06-07-2006, 01:51 PM
[No subject] - by joevenzon_phpbb2_import3 - 06-07-2006, 08:52 PM
[No subject] - by matthew_i - 06-11-2006, 03:12 PM
[No subject] - by nael - 06-12-2006, 09:30 AM
[No subject] - by joevenzon_phpbb2_import3 - 06-12-2006, 08:09 PM
[No subject] - by nael - 06-13-2006, 10:59 AM
[No subject] - by thelusiv - 06-13-2006, 02:02 PM
[No subject] - by nael - 06-14-2006, 01:21 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)