I'm trying to create a general buffer that I can use in my program. It will work with ints as well as strings. So far I've been using a strstream, and it works without a hitch, but I was wondering if there is a way to just create a generic iostream? Is iostream always associated with user input/output?

Member Avatar for iamthwee

stringstream is ok, it is by no means fool proof, but it is more or less robust enough to do the job.

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.