Thread: ReadLine()...refreshers???

  1. #1
    Registered User verbity's Avatar
    Join Date
    Nov 2006


    I totally forgot how to use readline(). I'm looking it up on the MSDN right now but it's got all the Environment::Console...blah blah blah.

    I'm working on a parser that: has a szBuffer[1024] that reads in 1024 bytes from the file and then parsers it. I just haven't done this in a while. Just a simple Readline(from file) example would be greatly appreciated.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    What language are you using that has ReadLine in it? Is this C#? C++/CLI? I have a feeling I'm looking at the same MSDN page you are; is it this one? If so, I have no idea how I could write something simpler than "sr->ReadLine()".

  3. #3
    Registered User
    Join Date
    Apr 2006
    You can use iostream's "getline" in the form of getline(filehandlestream, buffer);
    Or you can just read a whole file and separate by \n (or \r\n) using a C++ split/explode function.
    ★ Inferno provides Programming Tutorials in a variety of languages. Join our Programming Forums. ★

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to handle long lines using GNU readline?
    By rfk in forum C Programming
    Replies: 4
    Last Post: 08-18-2008, 11:04 PM
  2. change readline prompt
    By cstudent in forum C Programming
    Replies: 1
    Last Post: 04-19-2008, 10:00 AM
  3. ReadLine to int
    By DaveHope in forum C# Programming
    Replies: 2
    Last Post: 01-27-2006, 10:19 AM
  4. Using readline library with lex/yacc
    By jwong78 in forum C++ Programming
    Replies: 0
    Last Post: 10-28-2005, 05:18 PM
  5. Interacting with other programs with readline
    By Provost in forum C Programming
    Replies: 1
    Last Post: 08-13-2004, 06:24 AM