|
|
Input a double followed by a char (eg. '2h'): 2a The double was 0 |
Input a double followed by a char (eg. '2h'): 2a The double was 2 |
For "2a" val = 0, buffer = For "2b" val = 0, buffer = For "2c" val = 0, buffer = For "2d" val = 0, buffer = For "2e" val = 0, buffer = For "2f" val = 0, buffer = For "2g" val = 2, buffer = g For "2h" val = 2, buffer = h For "2i" val = 0, buffer = For "2j" val = 2, buffer = j For "2k" val = 2, buffer = k For "2l" val = 2, buffer = l For "2m" val = 2, buffer = m For "2n" val = 0, buffer = For "2o" val = 2, buffer = o For "2p" val = 0, buffer = For "2q" val = 2, buffer = q For "2r" val = 2, buffer = r For "2s" val = 2, buffer = s For "2t" val = 2, buffer = t For "2u" val = 2, buffer = u For "2v" val = 2, buffer = v For "2w" val = 2, buffer = w For "2x" val = 0, buffer = For "2y" val = 2, buffer = y |
g++ --version |
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix |
|
|
"2a" *** error *** "2e" *** error *** "0x2a" 42 "0x2ab" 683 "0x2ab.cp2" 2735 "abcd" *** error *** "NaN" nan "-INF" -inf |
"2a" 2 "2e" *** error *** "0x2a" 0 "0x2ab" 0 "0x2ab.cp2" 0 "abcd" *** error *** "NaN" *** error *** "-INF" *** error *** |
"2a" 2 "2e" *** error *** "0x2a" 0 "0x2ab" 0 "0x2ab.cp2" 0 "abcd" *** error *** "NaN" *** error *** "-INF" *** error *** |
|
|
------- libc++ ------- "2a" stream: *err* std::strtod: 2 std::sscanf: 2 "2e" stream: *err* std::strtod: 2 std::sscanf: 2 "0x2a" stream: 42 std::strtod: 42 std::sscanf: 42 "0x2ab" stream: 683 std::strtod: 683 std::sscanf: 683 "0x2ab.cp2" stream: 2735 std::strtod: 2735 std::sscanf: 2735 "abcd" stream: *err* std::strtod: *err* std::sscanf: *err* "NaN" stream: nan std::strtod: nan std::sscanf: nan "-INF" stream: -inf std::strtod: -inf std::sscanf: -inf ----- libstdc++ ------ "2a" stream: 2 std::strtod: 2 std::sscanf: 2 "2e" stream: *err* std::strtod: 2 std::sscanf: 2 "0x2a" stream: 0 std::strtod: 42 std::sscanf: 42 "0x2ab" stream: 0 std::strtod: 683 std::sscanf: 683 "0x2ab.cp2" stream: 0 std::strtod: 2735 std::sscanf: 2735 "abcd" stream: *err* std::strtod: *err* std::sscanf: *err* "NaN" stream: *err* std::strtod: nan std::sscanf: nan "-INF" stream: *err* std::strtod: -inf std::sscanf: -inf |