plz help me with run problem

This is a discussion on plz help me with run problem within the C++ Programming forums, part of the General Programming Boards category; i hve bloodshed 5.0 dev-c++ compiler and it can compile the code in the tutorials 4 c++ on this site ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    5

    plz help me with run problem

    i hve bloodshed 5.0 dev-c++ compiler and it can compile the code in the tutorials 4 c++ on this site with not errors but they will not run not even the first simple program plz help me if u can
    Last edited by onlinegeek; 12-14-2005 at 08:34 PM.

  2. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    You have to make the program wait for a key press.

    Code:
    cin.get();
    will work if you have:

    Code:
    using namespace std;
    if you don't have the namespace declared than do this:

    Code:
    std::cin.get();

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    5

    i did us a cin.get();

    i had both
    using namespace std;

    and i had a cin.get();
    but its still doesn't work the program box doesn't even blink up the run icon blinks and if i run task manager while running the program it picks it up 4 a sec but the program box never appears have u ever heard of that. i can get it to work but the tutorial code on this site won't run idk y but it won't.

  4. #4
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    you want to show us the code that won't work? That might help.

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    5
    Code:
     #include <iostream>
    
    using namespace std;
    
    int main()
    
    {
    cout<<"hello world\n";
    cin.get();
    }
    i think this is it perfect ly going on memory text in quotes is diff bu that don't matter

  6. #6
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    When you say dev-cpp 5.0 do you mean 4.9.9.2?

    I copy and pasted that code into my dev-cpp 4.9.9.2 and it ran fine. I'm not sure why it isn't working for you.

    Edit: When I say dev-cpp I mean dev-c++ (same thing).

  7. #7
    Registered User
    Join Date
    Dec 2005
    Posts
    5
    yeah thats what i have my b well it might just be my puter becasue the same program worked about 4 months ago when i was orinally starting to learn c++ on my sis laptop much newer in the same program but i stoped when she made me delete the program and i recently started again on this comp and have had problems since the beginning well ty any hoot ill just learn it write it compile it then run it on a different computer ill find someone else i no who i can mooch a puter off of until i get m ne pc ty again

  8. #8
    ^ Read Backwards^
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    282

  9. #9
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    There are some other compilers out there, I use Visual C++ 2005 Express. It is free, well at least now it is. But it is a huge hastle to set up and there are a few anoying bugs in it. Otherwise I find it works alot better than dev-cpp. So maybe try anouther compiler first.


    Edit: Although I read your post just fine, you should use periods and stuff and use corect spelling or if your like me use the best possible spelling with as little minor mistakes as possible. Maybe type a bit slower?

  10. #10
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    try replacing the cin.get(); with system("pause"); and see if that does anything
    Registered Linux User #380033. Be counted: http://counter.li.org

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with linked list and shared memory
    By Sirfabius in forum C Programming
    Replies: 10
    Last Post: 11-10-2008, 04:45 PM
  2. Problem with gcc
    By jayee_spicyguy in forum Linux Programming
    Replies: 8
    Last Post: 10-21-2008, 09:12 AM
  3. Run Problem
    By blrjohn in forum C Programming
    Replies: 10
    Last Post: 08-12-2008, 12:40 AM
  4. major .. serious .. C problem plz HELP!
    By Dina in forum C Programming
    Replies: 4
    Last Post: 07-16-2008, 06:22 PM
  5. Edit Control problem
    By Malek in forum Windows Programming
    Replies: 3
    Last Post: 06-16-2002, 02:12 AM

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