get and getline

This is a discussion on get and getline within the C++ Programming forums, part of the General Programming Boards category; tabstop: If I use a getline on temp it seems to me I will be back where I started. I ...

  1. #16
    Registered User lord's Avatar
    Join Date
    Dec 2006
    Posts
    61
    tabstop: If I use a getline on temp it seems to me I will be back where I started. I would read into temp until TERMINATE but then that will be discarded.

  2. #17
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    But there won't be a TERMINATE in temp -- get doesn't read it in but leaves it in the input buffer.

  3. #18
    Registered User lord's Avatar
    Join Date
    Dec 2006
    Posts
    61
    Oh yeah, all these errors are making me dizzy. Do you have any idea what could be causing that error. I noticed that if I changed it to stringbuf the error goes away but it will not let me use
    temp >> nonterm[entry][index++];
    or
    temp = nonterm[entry][index++];

    it tells me there is no matching operator.

  4. #19
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by lord View Post
    Oh yeah, all these errors are making me dizzy. Do you have any idea what could be causing that error. I noticed that if I changed it to stringbuf the error goes away but it will not let me use
    temp >> nonterm[entry][index++];
    or
    temp = nonterm[entry][index++];

    it tells me there is no matching operator.
    nonterm[entry][index++] = temp.str();

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21