On Tue, Sep 14, 2004 at 10:23:45AM +0300, learning c++ wrote: > Hi, > Is there a method in String class to convert a string to an int? > In C, there is atoi function. How about in C++? Hi. As much fun as this is (or better: was), this is not the "learning c++ for dummies" mailing list or forum. Your questions are off topic here since this mailing list deals specifically with issues regarding GCC - the Gnu Compiler Collection. If I'm not seriously mistaken, your postings never included the word gcc or g++ which is usually quite a strong indication that you posting to the wrong list. And WHY don't you get a good book on C++? This can't be so hard. I mean, if you don't want to buy, maybe you can borrow it from someone. And then, take the time and read it. If you don't understand something, just read it again. Usually it gets clearer on the second or third read. If you still have problems understanding something you surely should seek help from more experienced people. A good forum for your questions on usenet would be e.g.: comp.lang.c++ OR comp.lang.c++.moderated There are also a lot other resources, web based forums and references out there. E.g.: http://www.icce.rug.nl/documents/cplusplus/ http://www.cprogramming.com/ Also, since you're using GCC (at least I assume that) it is all open code and you can have a look at the string class whether it has a function returning an integer representation of its value or not. Also there are a few C++ STL online references out there you could have read. Just search the web. (e.g. http://www.dinkumware.com/refxcpp.html) Kind regards, Claudio PS: Sorry for ranting, but I had to get this off my chest...