Thread: Problem with compiler

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    69

    Problem with compiler

    I can't seem to work the function delay(); with devc++ it's just i do delay(500); but it says i need to define int delay() and it still doesn't work can you write out a program that might work?

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    I use Dev-C++ and I have never heard of the function delay. I searched the include files and I didn't find it either, so Dev-C++ must not come with the delay function. Since it can't find it in a header file, it tells you that you need to define it. For something similar to delay use Sleep() defined in winbase.h, but you can just include windows.h for convenience.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    32

    <iostream.h>

    i cant seem to get #include <iostream.h> to work on dev-c++

  4. #4
    Unregistered
    Guest
    I have dev c++, iostream.h works just fine.

  5. #5
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    to knight:
    Dev-C++ is a windows compiler, and delay() is normally defined in a dos compiler in dos.h. Though Dev-C++ has dos.h, it's a windows version of it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiler problem
    By xixpsychoxix in forum C++ Programming
    Replies: 5
    Last Post: 01-17-2009, 12:46 PM
  2. Dev-C++ compiler problem
    By GrasshopperEsq in forum C++ Programming
    Replies: 19
    Last Post: 05-08-2008, 02:35 AM
  3. Compiler Problem
    By sitestem in forum C++ Programming
    Replies: 2
    Last Post: 04-11-2004, 03:48 PM
  4. Replies: 5
    Last Post: 12-03-2003, 05:47 PM
  5. Please help me with this compiler problem
    By incognito in forum C++ Programming
    Replies: 1
    Last Post: 01-05-2002, 05:14 PM