Thread: gets("rope") ... help pls

  1. #16
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> are other C functions which intrupt C++ functionality?

    Probably! Although this is the area which seems to cause most problems.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  2. #17
    Unregistered
    Guest
    to me a stream is a source of data input, could be from keyboard, file, modem, or whatever. The data could be coming or going from the program.

    to me a buffer is any container used to temporarily hold data input from a stream until it can be used at a later time. Can be an array, a stack, a queue, or whatever. I suppose you could even consider a single variable to be a buffer, but usually I've seen the term used for a (potential) group of data.

  3. #18
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    you can safely mix C and C++ style i/o as long as you put in a call to sync_with_stdio(). This call forces both C and C++ style i/o to share their buffers.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  4. #19
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> as long as you put in a call to sync_with_stdio().

    Yes, that's true SC, I'd forgotten about that. ISTR there is a performance hit when you do that though.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #20
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    I dont know because I dont often use it. In fact the nearest I get is TextOut() lol. But I know how its done. I sould imagine that the c++ calss stay about the same and the c style calls would take a small performance hit but cant say for sure. try it and see.You could write a couple of small funcs that loop some output to file and input from file and use the profiler to see if there is much difference.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic port scanner code .. pls help ???
    By intruder in forum C Programming
    Replies: 18
    Last Post: 03-13-2003, 08:47 AM
  2. i dont know what to do. pls. help!!!!
    By Unregistered in forum C++ Programming
    Replies: 14
    Last Post: 03-14-2002, 03:24 PM
  3. help me pls..... :(
    By mocha_frap024 in forum C++ Programming
    Replies: 2
    Last Post: 02-22-2002, 10:46 AM
  4. pls help me!!
    By hanseler in forum C++ Programming
    Replies: 1
    Last Post: 12-05-2001, 08:46 PM
  5. Pls Help Me In This Question!!!
    By Joanna in forum Windows Programming
    Replies: 1
    Last Post: 10-20-2001, 02:05 PM