Won't Execute, Help Please.

This is a discussion on Won't Execute, Help Please. within the C Programming forums, part of the General Programming Boards category; Hi! Firstly i'm a computer dummie . I'm taking a Programming C class and what great fun it is! Yippies! ...

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    1

    Won't Execute, Help Please.

    Hi! Firstly i'm a computer dummie . I'm taking a Programming C class and what great fun it is! Yippies!

    Anywayz I really need help. I have lotsa homeworkie and I have to do them at home most of the time , sooooo I downloaded a free programming c ... program because I didn't want to spend 100~200$ on the microsoft one. The program is called Bloodshed C++, scary name for such a program, and I do my c programming on that! after it's done (my homework)and all I run it. It's fine! YIPPIE ! Next I execute it! That's where i'm having trouble. I see a box pop up and then it disappears in like SPLIT SECONDS! I think that was the program box that took me oh so long to do and I can't even see the sweat of my labor! After a few homework assignments I notice that SOMETIMES I can execute it fine and see the program in that black box thingy but MOST of the time it pop up and closes itself in split seconds. I'm getting concerned because my homework is getting hard and I need to make sure if my programs are correct.... Help please. What is wrong with it?!?!?!?

    Thanks,
    Your computer dummie!

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    8
    First wrong forum,

    Second what your seeing is a console which closes when no more input is required.

    to fix that see The faq

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,668
    Moved to C forum.

  4. #4
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    Execute the exe via command prompt. Or use something like
    Code:
    cin.ignore();
    //If that doesnt work in c:
    cin << SomeVaraible;
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  5. #5
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    since you said c programming and not c++, but are using a c++ compiler (dev cpp, not bloodshed - thats the website you download from...i think) that the others were mistaken in criticising you, and as a result, their code won't work for you... well it will, but if you're learning c and not c++, you wont see it in your books. what you want is exactly what they said - a user prompt. see this faq - covers c and c++ so whichever you're learning.

    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Execute Command from C fcn in DLL
    By karcheee in forum Windows Programming
    Replies: 2
    Last Post: 07-27-2005, 03:42 PM
  2. Execute prog as other user
    By groorj in forum C Programming
    Replies: 2
    Last Post: 05-04-2005, 12:28 PM
  3. classes won't execute
    By Mr.Pink in forum C++ Programming
    Replies: 4
    Last Post: 02-20-2005, 10:47 AM
  4. Execute from another program using C#
    By Grayson_Peddie in forum C# Programming
    Replies: 4
    Last Post: 05-04-2003, 12:03 PM
  5. Replies: 4
    Last Post: 01-22-2003, 02:19 PM

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