Thread: Alternate IO libs?

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    106

    Alternate IO libs?

    Iostream's generally massiveness is annoying me. I mean, like, something with stdio is 16 kbs. If you do the same thing with iostream, it compiles to 500 kbs. That's not cool

    My immediate thought following that is to get cozy with stdio (which, like, has far more functionality than iostream anyway, from what I can tell); however, afaik, that's not too friendly with the STL, or C++-style strings. So I was wondering if there was an i/o lib that could interface with the STL properly, yet also not be... as utterly bloated as iostream is.

  2. #2
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    What kind of crazy compiler are you using? I can pump in windows, iostream, fstream, tons of em @ just 100kb with code. Their arent to many thing that iostream can do that others cant, but in the end if you add em all it'll compile to about the same size. Still, 500kb is massive, simply including iostream should not do that.

    Stdio.h is the only alternative I know for simple console things, but their are probably others. I would reccomend just living with the 500kb file sence iostream is pritty standard. (Or getting a new compiler :P)
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > I mean, like, something with stdio is 16 kbs
    Are you kidding, that's why we code in ASM

    Seriously, it looks like you've mixed the debug build of one with the release version of the other.
    Or dynamically linked with stdio, but statically linked with iostream.

    Just compiling hello world, in C and C++, without and with debug
    Code:
    $ g++ foo.cpp && ls -l a.out
    -rwxrwxr-x  1 xxx xxx 6396 Feb  4 08:38 a.out
    $ gcc foo.c && ls -l a.out
    -rwxrwxr-x  1 xxx xxx 4681 Feb  4 08:38 a.out
    $
    $ g++ -g foo.cpp && ls -l a.out
    -rwxrwxr-x  1 xxx xxx 17604 Feb  4 08:39 a.out
    $ gcc -g foo.c && ls -l a.out
    -rwxrwxr-x  1 xxx xxx 5677 Feb  4 08:39 a.out
    > which, like, has far more functionality than iostream anyway,
    See, this is just comedy.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do I make shared libs on Linux?
    By cpjust in forum C Programming
    Replies: 13
    Last Post: 11-05-2007, 04:54 PM
  2. File IO with .Net SDK and platform SDK
    By AtomRiot in forum Windows Programming
    Replies: 5
    Last Post: 12-14-2004, 10:18 AM
  3. Totally puzzling IO problem
    By Vorok in forum C++ Programming
    Replies: 5
    Last Post: 01-06-2003, 07:10 PM
  4. more newbie questions - file io
    By sunzoner in forum C++ Programming
    Replies: 1
    Last Post: 06-13-2002, 04:33 AM
  5. DLL's and Lib's
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 06-10-2002, 10:19 PM