Skip to content
Snippets Groups Projects
Commit 0bb2ba00 authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

Ajout de deux programmes sur les stringstreams

parent b709af90
Branches
No related tags found
No related merge requests found
#include <iostream>
#include <sstream>
using namespace std;
int main() {
string s = "12 1 4 5";
istringstream a(s);
int i, j, k;
a >> i >> j >> k;
cout << k << endl;
return 0;
}
#include <iostream>
#include <sstream>
using namespace std;
int main() {
ostringstream flux;
flux << "41+1=" << 41+1;
string s = flux.str();
cout << s.length() << endl;
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment