F
Field
Hi,
the following snippet shows once executed this output:
2
2
I'd have rather expected this output:
2
10
Does anyone know why?
thx4hints,
FF
#include <iostream>
#include <sstream>
using namespace std;
int main(void)
{
string apName;
stringstream ss;
ss << 2;
ss >> apName;
cout << apName << endl;
ss << "10";
ss >> apName;
cout << apName << endl;
return 0;
}
the following snippet shows once executed this output:
2
2
I'd have rather expected this output:
2
10
Does anyone know why?
thx4hints,
FF
#include <iostream>
#include <sstream>
using namespace std;
int main(void)
{
string apName;
stringstream ss;
ss << 2;
ss >> apName;
cout << apName << endl;
ss << "10";
ss >> apName;
cout << apName << endl;
return 0;
}