Dev-C++

This is a discussion on Dev-C++ within the C++ Programming forums, part of the General Programming Boards category; I am following the instructions provided by this home website http://www.cprogramming.com/tutorial.html#c++tutorial but i'm having trouble compiling it. What am i ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    25

    Exclamation Dev-C++

    I am following the instructions provided by this home website http://www.cprogramming.com/tutorial.html#c++tutorial
    but i'm having trouble compiling it.
    What am i doing wrong?
    Code:
    #include <ionstream>
    using namespace std;
    int main()
    {    
        cout<<"This is a test Program!\n";
        cin.get();
        
        return 1;
    }
    \Programs\Programing\Programs\Untitled1.cpp E:\Programs\Programing\Programs\E ionstream: No such file or directory.
    E:\Programs\Programing\Programs\Untitled1.cpp In function `int main()':
    5 E:\Programs\Programing\Programs\Untitled1.cpp `cout' undeclared (first use this function)
    (Each undeclared identifier is reported only once for each function it appears in.) 6 E:\Programs\Programing\Programs\Untitled1.cpp `cin' undeclared (first use this function)

    and could someone please explain to my what in the world ionstream is and whatthe point of #include <ionstream>?

    Thanks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,395
    You have a typo error: it should be iostream, not ionstream (this has to do with Input/Output, not ions).

    Also, change the return 1 to return 0 (or remove it entirely as it is optional in C++ for the main function).
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    25
    I also tried copy pasting it but it still won't compile, what do i do?

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    It should be <iostream> (no 'n'), and the point is so you can use standard I/O streams like cout and cin.

  5. #5
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Ion Stream sounds like a cool company name, though...

  6. #6
    Registered User
    Join Date
    Jun 2008
    Posts
    25
    THANKS ALOT, i feel so dumb now, but still, what is iostream?

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,395
    A standard header that is included "so you can use standard I/O streams like cout and cin".
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,420
    Input/output streams such as cin, cout. Read data from keyboard/output to screen and the like.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    Registered User
    Join Date
    Apr 2008
    Posts
    890

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Whats better, C-Free or Dev C++??
    By i_can_do_this in forum Tech Board
    Replies: 10
    Last Post: 07-07-2006, 04:34 AM
  2. New to Dev C++/<windows.h>...
    By Cilius in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2005, 12:05 AM
  3. Glut and Dev C++, Programs not Quitting?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-29-2004, 07:43 PM
  4. DEV C++ Limitations?
    By Kirdra in forum Game Programming
    Replies: 3
    Last Post: 09-09-2002, 09:40 PM
  5. Tutorial about Bloodshed Dev!
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 11-13-2001, 06:42 PM

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