Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning values to a variable.

Status
Not open for further replies.

jamez05

Programmer
Jul 29, 2005
130
US
I'm converting an old executable to a dll. I'm new to
C++ and need to figure out how to concatenate and assign values to a variable.

For example, the old code looks like this:
scrn<<"A valence of "<<bcount[j]<<" on "<<atsymb[attype]<<" is too high for atom "<<j<<"\n";

I need to put this into a variable. I haven't found much documentation on this, so any help would be appreciated.
 
What's the datatype of scrn? By the name I would assume it's the same as cout.

What kind of variable do you want to assign it to?

My best guess from what I see is that a std::stringstream would be your best bet for a variable type to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top