language: C++ 4.7.2 (gcc-4.7.2)
date: 393 days 22 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
#include <string>
#include <sstream>
#include <iostream>
int main()
{
    std::string str="123";
    std::istringstream buf(str.substr(1,2));
    long int num;
    buf >> num;
    std::cout << num << '\n';
} 
  • upload with new input
  • result: Success     time: 0.01s    memory: 2860 kB     returned value: 0

    23