Thread: Error using Dev-C++ in Windows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    18

    Error using Dev-C++ in Windows

    Been a long time since using C++ but the error/message I keep getting is from Windows. Add in the fact that my program is working ( mostly ) then I can only assume that it's something completely outside of what I know.

    The message I get is simply "<insert program name> has encountered a problem and needs to close. We are sorry for the inconvenience." The specifics of my program are as follows: it is currently setup as a project with 2 .cpp files and one .h file. One .cpp file is the main file with the other one running function definitions. The .h file just contains the prototypes. There is only one function that I am using, code posted below.

    .h File
    Code:
    #include <conio.h>
    #include <cstdio>
    #include <iostream>
    
    #ifdef FUNCTIONS_H
    #define FUNCTIONS_H
    
    void wait_loop();
    
    #endif
    .ccp File
    Code:
    #include "functions.h"
    
    void wait_loop()
    {
        int input = 1;
        while (input != 13)
        {
            input = getch();
        };
        return;
    }
    Then in the main .cpp file it uses "wait_loop();" exactly like that.

    I've gotten the same error using different variations of this setup. I know that the function itself works because I've used it in other programs and in the original main file. If it's a really simple problem unrelated to Windows, sorry for posting in the wrong forum.

    Thank you.

    EDIT: When I said "works ( mostly )" I meant that the program starts, runs, but fails to close and displays aforementioned message. The main program itself works and as far as I know there should be nothing inside it that should cause this problem.
    Last edited by teck; 06-26-2010 at 06:39 PM. Reason: Missed information

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. how to make a windows application
    By crvenkapa in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2007, 09:59 AM
  3. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM