[ create a new paste ] login | about

Link: http://codepad.org/a6tkwnKQ    [ raw code | output | fork ]

Nameless - C++, pasted on Aug 7:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <sstream>

#define dbg(EXP) std::cout << std::boolalpha << #EXP ": " << (EXP) << std::endl

int main()
{
    double dval = -14.345;
    std::ostringstream oss;
    oss << dval;
    std::string str = oss.str();
    dbg(str);
    dbg(str == "-14.345");
    return EXIT_FAILURE;
}


Output:
1
2
str: -14.345
str == "-14.345": true


Create a new paste based on this one


Comments: