P
__PPS__
Hello everybody, that's already not a quiz question from school 
I wanted to design simple stuff that would allow me to program cgi
programs with cpp. My goal is to make reading input from user much like
traditional cpp programming with iostreams:
cout << "Enter date of birth and name: ";
cin >> dob >> name;
....
I wrote a cgi library and sometimes I was adding some new stuff when I
had some free time. Today, I had an idea and really liked it - in about
a couple of hours I wrote something that looks like traditional
iostream programming
here's the result: http://block111.servehttp.com/fcgid/lib_test/x
(take a look at the cpp source link)
the only problem with it is that I have to put promts in the sequence
of input parameters, something like
cgi::cin >> "enter this" >> This >> "enter that" >> That;
What could you suggest on how to improve on this; one of the ways could
be creating some reader object that handles this stuff like this:
date dob;
reader<date> date_reader(dob, "Enter DoB: ",...)
cin >> date_reader >> ...
thank you
I wanted to design simple stuff that would allow me to program cgi
programs with cpp. My goal is to make reading input from user much like
traditional cpp programming with iostreams:
cout << "Enter date of birth and name: ";
cin >> dob >> name;
....
I wrote a cgi library and sometimes I was adding some new stuff when I
had some free time. Today, I had an idea and really liked it - in about
a couple of hours I wrote something that looks like traditional
iostream programming
here's the result: http://block111.servehttp.com/fcgid/lib_test/x
(take a look at the cpp source link)
the only problem with it is that I have to put promts in the sequence
of input parameters, something like
cgi::cin >> "enter this" >> This >> "enter that" >> That;
What could you suggest on how to improve on this; one of the ways could
be creating some reader object that handles this stuff like this:
date dob;
reader<date> date_reader(dob, "Enter DoB: ",...)
cin >> date_reader >> ...
thank you