Arlong Park Forums

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Visual C++ Express problems

    Help Forums
    3
    6
    2300
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Le Lawliet
      Le Lawliet
      last edited by
      Le Lawliet
      spiral
      Le Lawliet
      spiral

      Anyone know anything about C? Well, I'm using Visual C++ 2005 Express to learn to use C (then C++ of course, as a program to compile and link they should be the same), and every time I finish making a program, when I launch the program, a window that should show the message I make (since I'm just starting, it's the natural "Hello, World!" Program) just stays up for a split second instead of staying until I close it.

      Now, when I mean starting to learn C, I mean I started it before but then eh… but before then, I was using my dad's... I think it was Visual Basic, which amazingly got the job done but when I tried to reinstall it, in wouldn't for some reason. But when I made "Hello, World!" on it, it worked.

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • E
        element31
        last edited by
        E
        spiral
        element31
        spiral

        I would suggest you to put at the end (before 'return') some function that stops program, for example 'getchar()'.
        Only some compilators make that program waits for "pressing any key" before closing.

        1 Reply Last reply Reply Quote 0
        • Le Lawliet
          Le Lawliet
          last edited by
          Le Lawliet
          spiral
          Le Lawliet
          spiral

          ah, thanks for the help.

          edit: perfect. Awesome. Thanks.

          1 Reply Last reply Reply Quote 0
          • Le Lawliet
            Le Lawliet
            last edited by
            Le Lawliet
            spiral
            Le Lawliet
            spiral
            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • igalsfy
              igalsfy
              last edited by
              igalsfy
              spiral
              igalsfy
              spiral

              just FYI, "pause;" is quite better than a getchar(). pause waits for any key press before closing the program. or you could also run the generated .exe from your msdos and forget the pause, getchar & co.

              1 Reply Last reply Reply Quote 0
              • Le Lawliet
                Le Lawliet
                last edited by
                Le Lawliet
                spiral
                Le Lawliet
                spiral

                hm, I see. that works too.

                Edit: Pause isn't working.

                1 Reply Last reply Reply Quote 0

                • 1 / 1
                • First post
                  Last post
                Powered by NodeBB | Contributors