前田稔(Maeda Minoru)の超初心者のプログラム入門
![]()
![]()
#include <iostream>
#include <sstream>
using namespace std;
ostringstream oss;
int i= 123;
float f= 3.14f;
char c[] = "abcXYZ";
int main()
{
oss << "i=" << i << " f=" << f << " c[]=" << c;
cout << "string: " << oss.str() << endl;
char c;
cin.get(c);
return 0;
}
|
| string: i=123 f=3.14 c[]=abcXYZ |
![]()