hello,
i just wanted to know if using the getline function is valid to read an input from the command line? also for this specific function do we have to use character pointers or can we use an char array??
hello,
i just wanted to know if using the getline function is valid to read an input from the command line? also for this specific function do we have to use character pointers or can we use an char array??
There is no standard getline function, though there is a POSIX standard getline, so you need to clarify what you are talking about.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
getline isn't standard C although it is available via GCC. For standard C see How to get a line of text FAQ. For GCC getline see GNU Getline Tutorial.
i have to implement a shell, so i have to read inputs entered by the user? is it ok to use getline()??
getline is not standard C so it is not guaranteed to work across all implementations. Click on the red things in my post above, they will provide you with the information you are looking for.