📄 cpp08.cpp
字号:
// Coded by plusir -- Jan.09.2003.
// Standard C++ Bible -- (P524-18-8)
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <string>
using namespace std ;
int main()
{
char instr[100] ;
cout << "Enter an integer, a float, and a string: " ;
cin.getline( instr, 100 ) ;
istringstream istr( instr ) ;
int n ;
float f ;
string s ;
istr >> n >> f >> s ;
cout << "Extracted from istringstream: " ;
cout << n << ' ' << f << ' ' << s << endl ;
return 0 ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -