T
Tcc
Hi all, I have a question about using the function getline()..
e.g. I have defined a structure:
struct s {
string *a;
Queue *b;
};
then in my main function:
main () {
s * t;
ifstream in("aaa.txt"); // an input file
getline(in, *t->a);<-------------------------------------this one
In this case, I would like to store the content of aaa.txt in to the struct
string *a, is it possiblew to do this?
Thanks
e.g. I have defined a structure:
struct s {
string *a;
Queue *b;
};
then in my main function:
main () {
s * t;
ifstream in("aaa.txt"); // an input file
getline(in, *t->a);<-------------------------------------this one
In this case, I would like to store the content of aaa.txt in to the struct
string *a, is it possiblew to do this?
Thanks