Community
    • Login

    Complete Beginner - Help Writing C++ Code

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 7.3k Views
    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.
    • Lindsay EvansL
      Lindsay Evans
      last edited by

      Hi everyone,

      I’m an absolute beginning and would appreciate any guidance you can give me! I have the most basic of questions for you.

      I just started a programming class with no programming experience. I would like to use Notepad++ to write my programs for class. I have to submit them as a .cpp file.

      Is there a place I can find a walkthrough for a beginner? I can figure out how to start a new file and input my code, but I don’t know what to do next. How do I run the program to make sure it works before I submit it to my professor? When I select “run” in the menu, it makes me choose a file, and then I am confused. I want to run the code I just typed in, not pick a file.

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ
        Jim Dailey
        last edited by

        Generally you will use NPP to edit your programs, but not to “run” them. It is possible to do that, but it is a bit of an advanced feature.

        First, you will need to write your program using NPP and save it. This version of the program is referred to as your program’s source code.

        Next you have to compile the source code with some C++ compiler, perhaps a particular one supplied by your instructor. The compiler creates an executable version of your program which on Windows will no doubt be named <something>.exe.

        The .exe is the file that you run and see if it does what you intended when you wrote the source code.

        1 Reply Last reply Reply Quote 0
        • Lindsay EvansL
          Lindsay Evans
          last edited by

          Thank you, Jim! :-) This makes sense. So do I write my code in NPP, then copy and paste it into a compiler?

          1 Reply Last reply Reply Quote 0
          • Scott SumnerS
            Scott Sumner
            last edited by

            Your first part is correct: You write your code in Notepad++. Your second part is wrong–it should be: You run the compiler and tell it where to find the file you created and saved in N++.

            1 Reply Last reply Reply Quote 0
            • Lindsay EvansL
              Lindsay Evans
              last edited by

              Thanks, Scott! That makes more sense than copying and pasting.

              I went to my professor’s office last night, and he walked me through using the compiler. I think I’m all set now. It has been a steep learning curve.

              This does give me a lot more appreciation for programmers and the complexity of what they’re doing when they make apps and games for us.

              1 Reply Last reply Reply Quote 0
              • Scott SumnerS
                Scott Sumner
                last edited by

                If you keep going, you will REALLY get an appreciation for that!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors