DJGPP Doesn't include IOSTREAM!!!!!!!!!!!

This is a discussion on DJGPP Doesn't include IOSTREAM!!!!!!!!!!! within the Game Programming forums, part of the General Programming Boards category; I just downloaded DJGPP Friday, because I was getting frustrated with Dev-C++. Now I just noticed...IOSTREAM ISN"T IN DJGPP! I ...

  1. #1
    Frenchfry164
    Guest

    DJGPP Doesn't include IOSTREAM!!!!!!!!!!!

    I just downloaded DJGPP Friday, because I was getting frustrated with Dev-C++. Now I just noticed...IOSTREAM ISN"T IN DJGPP! I tried to copy Dev-C++'s iostream over into DJGPP's include directory. I kept coming up with some file is missing. I copy that file over. Then another is missing. Finally I copied Dev-C++ whole include directory over to DJGPP's. Still didn't work. I was tempted to hit my monitor.

    The reason I need IOSTREAM is for cin. If you have an cin equivelent, plz tell me!

    PS: If you are totally retarded and don't know what cin is, look at the tutorials.

  2. #2
    Registered User Strider's Avatar
    Join Date
    Aug 2001
    Posts
    149
    Try using the gets() function with <stdio.h>

    You can look up the definition here:
    http://www.delorie.com/djgpp/doc/libc-2.02/

    There are many other I/O functions in stdio.h that can be used as well.

    David
    One Ring to rule them all, One Ring to find them,
    One Ring to bring them all and in the darkness bind them
    In the Land of Mordor where the Shadows lie.

  3. #3
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    Running Dev C++ and DJGPP does cause conflict on your computer. This is because both edit your autoexec.bat and both conflict over where header files are found. Try searching the DJGPP site to find iostream.h , or unistall it and reinstall if add the file and it still won't work.

    Code:
    #include <iostream.h>
    
    int main()
    {
    
      int num;
      cout << "enter a number" << endl;
      cin >> num;
      cout << "you typed " << num << endl;
    
      return 0;
    }
    Something like that should work under any C++ compiler.
    Ramble on...

  4. #4
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    Ramble on...

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    16
    You could also trying using istream.h and ostream.h instead of both header files in one...

    #include <istream.h>
    #include <ostream.h>
    "Where genius ends, madness begins."
    -Estauns

  6. #6
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    "Try using the gets() function with <stdio.h> "
    eh...shouldnt it be puts()?

  7. #7
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428

    !!@

    DUH! just realized he said 'cin' not 'cout'...sorry, gets() is right . cheers

  8. #8
    Unregistered
    Guest
    Are you programming in c or in c++? You can`t use iostream.h
    in c programs.

    Are you sure you downloaded rights DJGPP files?
    If you didn`t download c++ exentsion you can`t to c++ programs

    It is impossible to get DJGPP work with another compiler include files.

  9. #9
    Intranasal Heroin User Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,035
    frenchfry's right...I ditched DJGPP because it didn't include iostream...i bet this is a common problem, I re-installed DJGPP only 400 times

  10. #10
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,494
    With DJGPP, the command to run the C++ compile is gxx, not gcc

    C program
    gcc prog.c

    C++ program
    gxx prog.cpp

    > It is impossible to get DJGPP work with another compiler include files.
    This is (almost always) true for any pair of compilers.
    Even with different versions of the same compiler, you're on a slippery slope.

    > I ditched DJGPP because it didn't include iostream
    It's here D:\DJGPP\lang\cxx\iostream.h
    If it isn't then you didn't download it or install it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  11. #11
    Unregistered
    Guest
    >>
    Running Dev C++ and DJGPP does cause conflict on your computer. This is because both edit your autoexec.bat and both conflict over where header files are found.
    <<

    Not true. Dev-C++ can run on the same computer as DJGPP because Dev-C++ doesn't modify autoexec.bat. It can get away with this because it reads an .ini file in its current directory for path info. This lovely little feature will even allow you to run multiple versions of Dev-C++ without conflict.

    I would agree that you must not have downloaded all the components for DJGPP.

    But why don't you like Dev-C++? Add the wonderful graphics and sound library Allegro and you can have fast, DirectX games for Windows with little effort. You don't have to complie the library anymore. I've set up an installer for the latest version of Allegro for Dev-C++ at my site: http://www.envy.nu/springsoft/main.html It's all point and click and only about 1.6MB.

    (Of course, you may not like it for other reasons, so I'll stop shamelessly promoting my site now.)

  12. #12
    Former Member
    Join Date
    Oct 2001
    Posts
    955
    of course it does, I've just made a simple cout program and it works..

    are you sure you installed it properly?

    Oskilian

  13. #13
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    I ditched Dev-C++ because it's DOS programs are f***ed up. Never mind anyway, im just going to use getch(). You say, that only checks if one key is pressed. True. But in my program it's better that way, so you dont have to press U enter just to move up. I got it to where you just press U with getch().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  2. Weird, cards not outputting correctly
    By Shamino in forum C++ Programming
    Replies: 5
    Last Post: 11-30-2007, 02:26 PM
  3. does not name a type ERROR
    By DarrenY in forum C++ Programming
    Replies: 3
    Last Post: 10-13-2007, 04:54 AM
  4. #include problem
    By rwmarsh in forum C++ Programming
    Replies: 4
    Last Post: 07-07-2006, 03:00 PM
  5. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 02:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21