How can I convert a string into an integer? I tried this: totalMins += atoi(MovieRecord->getMinutes()); Which I think only works for C-strings, and I tried this: totalMins += static_cast<int>(MovieRecord->getMinutes()); which I think only works for converting an int to a double or something similar.
rookieNeedsHelp 0 Newbie Poster
Labdabeta 182 Posting Pro in Training Featured Poster
L7Sqr 227 Practically a Master Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
rookieNeedsHelp 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.