C++ Game

This is a discussion on C++ Game within the Game Programming forums, part of the General Programming Boards category; Okay, I am making a game (no duh), and I can't seem to get it to run anywhere. I don't ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    9

    Talking C++ Game

    Okay, I am making a game (no duh), and I can't seem to get it to run anywhere. I don't know why it wont work. How do you all get yours to save as ".exe"? Any help here would be greatly appreciated.

  2. #2
    Spaced Cadet
    Join Date
    Aug 2003
    Posts
    110
    Compile?
    What Compiler do you use?

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    9
    Microsoft Visual C++ OR Dev C++, I have both.

  4. #4
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    In MSVC, push F5 or shift F5 (I think that's right). Does it compile without error?

    If you haven't mastered using a compiler yet, you shouldn't be making a game. You should be reading tutorials on making "Hello World" programs.
    Away.

  5. #5
    Registered User
    Join Date
    Oct 2003
    Posts
    9
    Okay, here's waht happens. (exactly)
    I press compile
    compiles with no problem
    Then I hit run
    Then it says
    "C:\Debug\Text1.exe
    This file does not exist. Do you want to build it?"
    I click yes
    then it says "cannot excecute program"
    There are NO errors nor warnings.

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    press Ctrl+Alt+Del
    to get to the windows task manager
    your program may already be running so click on "processes"
    and look there after your programs title if you find it there end it and try to compile again. if it isnt there then i dont know whats wrong

  7. #7
    Registered User
    Join Date
    Oct 2003
    Posts
    9
    Ok, well it seems that the real problem happens when i hit compile...(It builds just fine, that must have been what I was doing, and also what F5 does...)It says
    "Cannont compile the file 'C:\test.txt'; no compile tool is associated with the file extension."
    I cannot save it as any other file type either. ".txt" is the only extension it allows. Am I missing something?(not running two at once btw)

  8. #8
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Yes, you're missing something. You have to save it as .c or .cpp. And don't tell me you can't; you can.
    Away.

  9. #9
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    How about saving it like this:
    Attached Images Attached Images  
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  10. #10
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    yes change the .txt to .c or .cpp

  11. #11
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    My 2 cents

    1. This post (not meant to be a flame) has NOTHING to do w/game programming. He just said "I'm making a game", and left it at that.

    2. Jawib, what's Army Operations. How did you upload that picture? Did you put on a website or something?
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  12. #12
    Registered User
    Join Date
    Jun 2003
    Posts
    17
    Stan, Army Operations is a shortcut to the game America's Army produced by the U.S.
    It is an online tactical fps. It free and has good graphics.
    www.americasarmy.com

  13. #13
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Yeah pretty good game, although I only played it for a couple weeks. It was fun to play with my friend and talk over the phone, but he stopped playing, so...And I attached the picture by typing it in the "Attach file" field...I think it only displays it if it is a gif or a jpeg though
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  14. #14
    Registered User
    Join Date
    Oct 2003
    Posts
    9
    Thanks to all of your WONDERFUL help I got this working now ^^.
    My program seems to be working good now, and I hope to get it up soon. I can not thank you guys enough!

    As for this being a spam thread I am planning to post my game in here later. (as soon as it works) I was simply making the forums easier to browse through by making myself only one thread.
    Last edited by Mecha; 11-03-2003 at 10:17 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-08-2010, 12:08 AM
  2. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 11:44 AM
  3. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 03:46 PM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-25-2002, 12:00 AM

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