Is there an opposite of .toString()?

myst a at b.c
Sat Oct 14 02:34:17 UTC 2017


On Saturday, 14 October 2017 at 02:16:12 UTC, Fra Mecca wrote:
> On Saturday, 14 October 2017 at 00:18:35 UTC, myst wrote:
> ...
> some snippet of a c++ code that does what you mean

#include <istream>
#include <string>

struct S {
     std::string s;
     int p;
     int n;
};

std::istream& operator>>(std::istream& is, S& s)
{
     is >> s.s >> s.p >> s.n;
     return is;
}


More information about the Digitalmars-d-learn mailing list