07-19-2011, 06:35 PM
C++ stringstream array to int in c++ 2011
#include<iostream>
#include<sstream>
using namespace std;
int main (char argc)
{
int l = 1;
for(l = l; l > 0; l--)
{
int q = -2;
string n1 = "1+5";
int n;
int e;
stringstream(n1[q=q+2]) >> n;
stringstream(n1[q=q+2]) >> e;
cout << n + e << endl;
}
system("pause");
}
#include<iostream>
#include<sstream>
using namespace std;
int main (char argc)
{
int l = 1;
for(l = l; l > 0; l--)
{
int q = -2;
string n1 = "1+5";
int n;
int e;
stringstream(n1[q=q+2]) >> n;
stringstream(n1[q=q+2]) >> e;
cout << n + e << endl;
}
system("pause");
}
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
