Thread: how to use char **line

  1. #1
    Registered User
    Join Date
    Feb 2019
    Posts
    2

    how to use char **line

    Hi,

    I have a fuction like : int fucntion(char **line), i would like to know what i need to put for it's work.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    26,319
    What is this function supposed to do?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Feb 2019
    Posts
    2

    code

    Code:
    int
    Code:
    get_next_line(constint fd, char**line)
    {
    
    char*text;
    
    int     buf_size;
    
    
        buf_size = READ_SIZE;
    
        text =malloc(sizeof(char) * buf_size);
    
    if (fd <0||!text ||!line)
    
    return (-1);
    
    return (read_line(text, buf_size, line, fd));
    
    }
    

    here is my function, this need to return a line.
    Last edited by AnonymousCode; 1 Week Ago at 11:34 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fgets to read a line without returning the new line char \n
    By khaliiid1992 in forum C Programming
    Replies: 7
    Last Post: 11-06-2014, 02:53 PM
  2. How to input char variables in the same line?
    By Lucas525 in forum C++ Programming
    Replies: 16
    Last Post: 01-17-2012, 01:36 PM
  3. Converting command line char *argv[] to int
    By Winslow in forum C Programming
    Replies: 2
    Last Post: 01-30-2011, 02:41 PM
  4. reading a file line by line and char *
    By odysseus.lost in forum C Programming
    Replies: 8
    Last Post: 05-31-2005, 09:47 AM
  5. follow up with char I/O and line, word, and char counting
    By Led Zeppelin in forum C Programming
    Replies: 1
    Last Post: 03-23-2002, 09:26 PM

Tags for this Thread