[ create a new paste ] login | about

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

C++, pasted on Aug 4:
1
2
3
4
5
6
7
8
9
10
11
12
int main(int argc, char** argv) { 
 
  std::stringstream myStream; 
  myStream << "-123"; 
 
  unsigned int myUInt; 
  myStream >> myUInt; 
 
  if(myStream.fail()) { 
    std::cout << "FAILED" << std::endl; 
  } 
} 


Output:
1
FAILED


Create a new paste based on this one


Comments: