Albino
-6
Junior Poster in Training
Recommended Answers
Jump to PostMy preferred method is to use stringstream. As in:
#include <iostream> #include <sstream> using namespace std; int main() { stringstream ss1("42"); int value; ss1 >> value; // convert string to int cout << value << endl; stringstream ss2; ss2 << value; // convert int …
All 3 Replies
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
ravenous
266
Posting Pro in Training
Lucaci Andrew
140
Za s|n
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.