00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef toString_h
00028 #define toString_h
00029
00030 #include <string>
00031 #include <stdlib.h>
00032 #include <string.h>
00033 #include <stdio.h>
00034
00035 using std::string;
00036
00037
00038 inline string toString(int d)
00039 {
00040 char s[32];
00041 snprintf(s, 32, "%d", d);
00042 return string(s);
00043 }
00044
00045
00046 inline string toString(long ld)
00047 {
00048 char s[32];
00049 snprintf(s, 32, "%ld", ld);
00050 return string(s);
00051 }
00052
00053 inline string toString(long long Ld)
00054 {
00055 char s[32];
00056 snprintf(s, 32, "%Ld", Ld);
00057 return string(s);
00058 }
00059
00060 #endif // toString_h
00061