Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
programming:howtos-tips [2008/11/15 09:13] cyril |
programming:howtos-tips [2014/04/16 18:07] (current) cyril [Conversions with string] |
||
|---|---|---|---|
| Line 117: | Line 117: | ||
| <code cpp> | <code cpp> | ||
| - | std::cout << " | + | std::cout << " |
| - | << " | + | << " |
| << " | << " | ||
| </ | </ | ||
| Line 182: | Line 182: | ||
| <code c> | <code c> | ||
| #define ERROR(msg, ...) fprintf(" | #define ERROR(msg, ...) fprintf(" | ||
| + | </ | ||
| + | You can also use the '' | ||
| + | < | ||
| + | #define ERROR(msg, ...) fprintf(" | ||
| </ | </ | ||
| Line 206: | Line 210: | ||
| #include < | #include < | ||
| char s[128]; | char s[128]; | ||
| - | sprintf(" | + | sprintf(s, " |
| </ | </ | ||
| Line 215: | Line 219: | ||
| #include < | #include < | ||
| int i = atoi(" | int i = atoi(" | ||
| - | float f = atof("4.5"); | + | long l = atol("4500294"); |
| - | double | + | double |
| </ | </ | ||
| Line 321: | Line 325: | ||
| | | ||
| ... | ... | ||
| - | double() { return data / (double)(1<< | + | |
| }; | }; | ||
