Thread: function insline()

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    12

    function insline()

    hi
    there is a function in c called insline(). This function is not supported by microsoft visual studio any more. does any one know what other function can do instead of insline()

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    If it does what its description is:
    Code:
    void insline(FILE * fp)
    {
        putc('\n', fp);
    }

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    No, zcs7, that's not what it does. It inserts a line by scrolling the text below the current cursor position down, and thus doesn't belong in the stdio.h category of IO operations.

    For full, portable support, you probably want to look at pdcurses or some such.

    For simply implementing it yourself, you want to look at the Windows Console functions. In particular, to achieve this, you will be looking at the ReadConsoleOutput and WriteConsoleOutput functions.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by matsp
    No, zcs7, that's not what it does.
    But of course, since insline() is not standard, what it does depends on which library it is from (and then again, that is true even for functions in the standard library).
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  4. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM