I am trying to make a program which puts the contents stored in a stringstream (a large number) into an unsigned long format. But the compiler shows an error
error: invalid user-defined conversion from 'std::stringstream {aka std::basic_stringstream}' to 'long unsigned int' [-fpermissive]|
The code I've written is:
stringstream raw_a;
stringstream raw_b;
//code which reads data into raw_a and raw_b
unsigned long out_a;
unsigned long out_b;
out_a = raw_a;
out_b = raw_b;
I have spent the last hour scouring the web in vain. Any help (including links to any other questions) is highly appreciated.