Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
Code snippets to convert a certain data type to another one.
Checks code
snippets check if this conversion can be succesfull.
0.
boost::lexical_cast, convert std::string to any data
type
1.
boost::lexical_cast, convert std::string to double
2.
boost::lexical_cast, convert std::string to integer
3.
Convert AnsiString to double
4.
Convert AnsiString to integer
5.
Convert AnsiString to lower case
6.
Convert AnsiString to std::string
7.
Convert AnsiString to upper case
8.
Convert AnsiString to WideString
9.
Convert double to AnsiString
10. Convert double to std::string
11. Convert Gray code to int, GrayToInt
12.
Convert
int to a std::string of zeroes and ones, IntToBitString
13.
Convert int to
Gray code, IntToGray
14.
Convert integer to AnsiString
15.
Convert integer to std::string
16.
Convert Matrix<X> to Matrix<Y>,
ConvertMatrix
17.
Convert RGB values to TColor
18.
Convert std::string to AnsiString
19.
Convert std::string to any data type,
boost::lexical_cast
20.
Convert std::string to any data type, LexicalCast
21.
Convert std::string to double, boost::lexical_cast
22.
Convert std::string to double, LexicalCast
23.
Convert std::string to double, ToDouble
24.
Convert std::string to integer, boost::lexical_cast
25.
Convert std::string to integer, LexicalCast
26.
Convert std::string to integer, ToInt
27.
Convert std::string to lower case
28.
Convert std::string to upper case
29.
Convert std::string to WideString
30.
Convert std::vector<std::vector<X> > to
std::vector<std::vector<Y> >, ConvertMatrix
31.
Convert TColor to RGB values
32.
Convert TImage to TStringList (ASCII art)
33.
Convert two 2D std::vector<X> to 2D
std::vector<Y>, ConvertMatrix
34.
Convert WideString to AnsiString
35.
Convert WideString to double
36.
Convert WideString to integer
37.
Convert WideString to std::string
38.
ConvertMatrix, convert Matrix<X> to
Matrix<Y>
39.
ConvertMatrix, convert
std::vector<std::vector<X> > to std::vector<std::vector<Y>
>
40.
ConvertMatrix, convert two 2D std::vector<X>
to 2D std::vector<Y>
41. GrayToInt, convert Gray code to int
42.
IntToBitString,
convert int to a std::string of zeroes and ones
43.
IntToGray,
convert int to Gray code
44.
lexical_cast, boost::lexical_cast, convert
std::string to any data type
45.
lexical_cast, boost::lexical_cast, convert
std::string to double
46.
lexical_cast, boost::lexical_cast, convert
std::string to integer
47.
LexicalCast, convert std::string to any data type
48.
LexicalCast, convert std::string to double
49.
LexicalCast, convert std::string to integer
50.
ToDouble, convert std::string to double
51.
ToInt, convert std::string to integer