Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Converting from string to int

Name: Anonymous 2010-10-16 11:18

I've been trying to figure out for 2 hours how to translate a series of chars (in a string) into int variables in C++. What I got this far is:

int x << (int)stringvar[5];

It builds, but it returns every character as a 0.

anyone got any ideas?

Name: Anonymous 2010-10-16 12:06

>>6
I thought about atoi for a moment, but was disgusted with this thought.  atoi is inherently dirty, C-like, .h-file including filth.  Learn to use C++ toolset when writing C++.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List