Thread: Dev-C IDE

  1. #1

    Dev-C IDE

    Question from a beginner
    Downloaded Bloodshed Dev-C++ and put a learningbook next to it about programming in C.
    Entered the following code :

    main( )
    printf("hello, world");

    Simple first program, but get after compile and run the error :

    implicit declaration of function `int printf(...)'

    Nice thing for a starter huh ?
    What's wrong ?
    Second question, what's the function in C/C++ for the Pascalfunction Readln ?
    Would be nice to see the little Dos screen stay up to see what I've have have done.

  2. #2
    Registered User jasrajva's Avatar
    Join Date
    Oct 2001
    add #include <stdio.h>
    before your code and it should work

    stdio.h contains the defn of the printf fn

  3. #3
    Thx for awesome quick reply, Rasrajva

    It worked, but how to have the pop-up Dos screen to stay up to actually see the line " hello, world" e.g to see my compiled output ??

  4. #4
    Registered User jasrajva's Avatar
    Join Date
    Oct 2001


    you need to call a fn that waits for an enter or something at the end of your program

    i normally do it this way

    #include <stdio.h>
    #include <conio.h> /*for getch()*/

    int main(void)
    printf("Hello World!");

    return 0;

  5. #5
    worked perfect, thx again

    What are btw your idea of learning programming in C\C++ ?
    First C and then C++, or better start directly with C++ ?

  6. #6
    Registered User jasrajva's Avatar
    Join Date
    Oct 2001
    any way would do really
    they make look similar
    but are essentially different languages

    c++ is a superset of c but to use it effectively it should not be used like c is used

    so whichever way you go no trouble

    only i blieve evryone should know c

    and i learnt em in that order so go for c first and then c++ if youve got the time

  7. #7
    Registered User pub_enemy01's Avatar
    Join Date
    Nov 2001

    To learn C++, you are learning C at the same time, except with different i/o standards, and a different programming paradigm. Although, to learn OOP, is to learn Procedural Programming, except with the addition of objects, which is the basis of OOP.

    So basically, it is a strange philosophical question. To learn C++, you are learning C, but also, you are learning a totally different language. I hope that was enlightening to you, it certainly was for me.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IDE
    By djnorthyy in forum C++ Programming
    Replies: 6
    Last Post: 03-31-2008, 11:56 AM
  2. 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
  3. CBoard IDE of the year
    By cboard_member in forum A Brief History of
    Replies: 30
    Last Post: 12-09-2005, 07:50 AM
  4. Glut and Dev C++, Programs not Quitting?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-29-2004, 08:43 PM
  5. HD on IDE 2
    By W.Churchill in forum A Brief History of
    Replies: 3
    Last Post: 03-13-2002, 08:53 PM