dev-c++ help

This is a discussion on dev-c++ help within the C++ Programming forums, part of the General Programming Boards category; i have dev-c++ version 4.9.7.0 and i tried to do the tutorials on this site, and on lesson 1 it ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    176

    Question dev-c++ help

    i have dev-c++ version 4.9.7.0 and i tried to do the tutorials on this site, and on lesson 1 it says that you can just cut and past this program and try and run it in your compiler. well i tried to do this and it came up with all kinds of error messages. i was wondering is there something i have to do to set my compiler up? or what am i doin wrong?

  2. #2
    ! |-| /-\ +3 1337 Yawgmoth's Avatar
    Join Date
    Dec 2002
    Posts
    187
    Perhaps you couldshow us the proram and error messages.
    L33t sp3@k sux0rz (uZ it t@k3s 10 m1|\|ut3s 2 tr@nzl@te 1 \/\/0rd & th3n j00 h@\/3 2 g3t p@$t d@ m1zpelli|\|gz, @tr0(i0u$ gr@mm@r @|\|d 1n(0/\/\pr3#3|\|$1bl3 $l@|\|g. 1t p\/\/33nz j00!!

    Speling is my faverit sujekt

    I am a signature virus. Add me to your signature so that I may multiply.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    176
    well maybe the problem is when i go to file then to project they give me 5 options to choose from (windows application,console application,static library,dll,and empty project)
    i am not sure which to choose from so if you could tell me that i will try again. if that doesn't work i will post the error messages.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    176
    ok ill try console the program is

    #include <iostream.h>

    int main()

    {

    cout<<"HEY, you, I'm alive! Oh, and Hello World!";

    return 0;

    }

    and the error messages are

    22 C:\Dev-Cpp\main.cpp:1
    iostream.h: No such file or directory.
    C:\Dev-Cpp\main.cpp
    [Warning] In function `int main()':
    7 C:\Dev-Cpp\main.cpp
    `cout' undeclared (first use this function)

    (Each undeclared identifier is reported only once for each function
    C:\Dev-Cpp\Makefile.win
    [Build Error] [main.o] Error 1

  5. #5
    ! |-| /-\ +3 1337 Yawgmoth's Avatar
    Join Date
    Dec 2002
    Posts
    187
    Two things: get Dev-C++ 4, the nonbeta.

    Also, when you have those five options, I would reccomend console app or empty project. Or instead of going into File->New Project, just click the new source file button, the one next to the save button.
    L33t sp3@k sux0rz (uZ it t@k3s 10 m1|\|ut3s 2 tr@nzl@te 1 \/\/0rd & th3n j00 h@\/3 2 g3t p@$t d@ m1zpelli|\|gz, @tr0(i0u$ gr@mm@r @|\|d 1n(0/\/\pr3#3|\|$1bl3 $l@|\|g. 1t p\/\/33nz j00!!

    Speling is my faverit sujekt

    I am a signature virus. Add me to your signature so that I may multiply.

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    Code:
    #include <iostream>
    int main()
    {
    std::cout<<"HEY, you, I'm alive! Oh, and Hello World!";
    std::cin.get();
    return 0; 
    }

  7. #7
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Something is wrong with your paths because it can't find iostream.h. I assume that you can find iostream.h... right? Is it there?

    I haven't used dev c++, but I've used a few different compilers over the years, and they have NEVER worked the first time! Usually it's a path problem like you are having (can't find .h file, or can't find .cpp file.) Sometimes I didn't know where it was putting the .exe file!

    [EDIT]
    And, use USE CODE TAGS . Look at the link at the top of the board that says "Posting Code? Read This."
    Last edited by DougDbug; 04-02-2003 at 04:44 PM.

  8. #8
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    oh, yeah, i forgot about the paths.

    you should look at the bloodshed forum. there are many threads there that talk about this. I believe they are still fixing the install to install the paths correctly.

    but keep in mind that you would get backwards warnings with iostream.h

  9. #9
    Registered User
    Join Date
    Mar 2003
    Posts
    73
    Originally posted by alpha
    but keep in mind that you would get backwards warnings with iostream.h
    When ever I get a backwards warning when using an include file with Dev C++, it's usually because of my own error in my coding.. The compiler just doesn't know how to address the error correctly.

    Yeah, like the others said though, it's probably a path error.

    And if you just want to start a blank .cpp file (which is good for copying tutorial stuff) just hit CTRL+N.

  10. #10
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    Originally posted by Nuke
    When ever I get a backwards warning when using an include file with Dev C++, it's usually because of my own error in my coding.. The compiler just doesn't know how to address the error correctly.
    You will get backwards warnings with iostream.h, string.h, vector.h, just to name a few because they are not part of the current standard. the standard now is to include iostream, string, vector, etc. without the .h . If it is an error, it will say so, but not as a backwards warning. it will say certain fxns to be undeclared if some scope to the std namespace isn't given, if using current standard. Other warnings show up but not as backwards warnings unless you have a backwards warning.

    to put it short, and not circuitous which the above kindof is, just too lazy to delete; even if you have no errors in your code, and you included iostream.h for example, then you will get a backwards warning.

    this goes with mingw 3.2 not 2.95.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. New to Dev C++/<windows.h>...
    By Cilius in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2005, 12:05 AM
  2. Glut and Dev C++, Programs not Quitting?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-29-2004, 07:43 PM
  3. openGL programming - From MSVC++ to Dev C++
    By WDT in forum Game Programming
    Replies: 3
    Last Post: 03-08-2004, 07:47 PM
  4. openGL programming - From MSVC++ to Dev C++
    By WDT in forum Game Programming
    Replies: 1
    Last Post: 03-08-2004, 04:19 PM
  5. DEV C++ Limitations?
    By Kirdra in forum Game Programming
    Replies: 3
    Last Post: 09-09-2002, 09:40 PM

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