Computer Scientist

Tuesday, 10 August 2010

C++ Programming Tips...

Converting from a String to a integer can be achieved by a build-in function atoi() which can be found from the manual page. However the conversion from a integer to a String can not follow the similar method due to the itoa() function  is not a build-in function. It is a compiler dependent method. In C++, there is a handy method:

#include

int number;

std::ostringstream sin;
sin << number;
std::string aString= sin.str();

char* c_type_string = aString.c_str();

1 comment:

  1. It has casino.edu.kg the standard old} stuff like loads of machines to play on, quantity of} adjustments to earn free spins throughout the day, and flashy graphics with big jackpots. This one also provides social casino occasions, a good friend system, and tournaments with up to as} 32 whole gamers. Most of the one star ratings are from people who just about by no means win, so it is potential to play this recreation and never win.

    ReplyDelete