Hi, Faggio.
It's not easy to give opinions about such a small piece of code that can't even compile, but I'll try to pinpoint a couple of potential issues.
friend istream& operator >>(istream& is, Entry <T> &dest)
If the function is
friend
, it can't be part of the class. So I think you should move the definition outside the class.
This could help also in the error you get about
ss >> riga;
.
Other weird things are the fact that you declare for example
string _desc
but you didn't seem to include <string> (but you include <cstring>... to what avail, if I may ask?).
BTW, why do you declare "i" outside the for loop?
1 2
|
size_t i;
for(i=0; i<_v.size(); i++)
|
Do you have a further use for it?
I'm bound to confess I find it confusing to have functions and variable with the same names, apart from an underscore... Do you find it easy to read? Well, that's just a matter of tastes, I presume.
I think you ought be better not to declare
using namespace std;
, as you are likely to have done somewhere.
Hope that could be of some help.