Re: Fw: [Dev-C++] Super charging the string class
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Michal M. <mi...@mo...> - 2003-07-05 16:20:52
|
what about using stringstream? David McKen wrote: > Unfortunately I am using the Visual C++ implementation of the Standard > C++ library (Visual C++ 6.0 Service pack 5). > > My chief concern is the fact that the entire hash_* functions and > containers are missing (this may seem small but as I said earlier my > program is quite heavy on text processing, so hashing is quite important > to me.) > > Much of the rest of the library seems to be intact and working. Much of > my additions will allow me to use various data types with strings (This > is how parts of my program are now) > > temp += "My dice roll = "; > temp += itoa(comp_roll); > temp += eoln; > > temp += "Your dice roll = "; > temp += itoa(player_roll); > temp += eoln; > > (this version of itoa is my implementation, eoln = const char = "\n\r", > player roll and comp roll are ints containing a random number between 1 > and 6 inclusive) > > As you can guess this can get quite annoying. being able to turn each > block into 1 line would be quite advantageous. |