Adblock breaks this site

Assistance

Discussion in 'Programming General' started by SomeFormOfHuman, Oct 8, 2012.

  1. SomeFormOfHuman

    SomeFormOfHuman Forum Addict
    Banned

    Joined:
    Sep 6, 2011
    Posts:
    434
    Referrals:
    0
    Sythe Gold:
    0
    Assistance

    I'm trying my very hardest to learn how to code in C++. I purchased Govind's guide on bot making using C++, but now I have no intention of making bots. I'm just using it to learn the basics so to speak. I'm finding it very easy to grasp the coding aspect of it and what everything means, but the hardest part I'm experiencing is understanding how it is I should use the code to do what I want my program to do. It's very hard to explain, but that is the best way I can describe it. I don't need an example so to speak, but I'd be glad to explain to you the program I want to make. I don't want it written, but I just don't even know where to start.
     
  2. Blupig

    Blupig BEEF TOILET
    $5 USD Donor

    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant
    Assistance

    Before you hop into code you have to know how code works. It's really simple: code works in steps. Let's say you're making a calculator. You need to know how the calculator will perform, and then you break that performance into steps:

    • Will it have buttons? If so, make and place buttons.
    • What will the buttons do? If you want to add two numbers together, you have number buttons, an addition button, and an equals button.
    • When the person clicks the first number button, you have to remember the number somehow, so put it in a variable. For instance, "int number1".
    • Now you have to detect when the + button is pushed. You can made a boolean that is something like "IsPlusPushed" and make it true when the + button is pushed.
    • Now you get the second number. Store it again, but in a different variable - "int number2" or something.
    • So, for the equals button, you know that you have 2 numbers and you know that you have an addition or not. You put in a few if statements to see if everything checks out, and if it does, all you do is output "number1 + number2". There you go, basic calculator.

    Your issues are with logic. If I were you, I'd get different ideas for programs and start making flowcharts and instruction lists to sort of get the hang of the process. Another good trick is to look at everyday things and imagine the steps in between. So, going to school - You bend down, you put on your right shoe, you look for your left shoe, you put on your left show, you sit down, you tie both shoes, you get up, you grab your bag, you go towards the door, you turn the knob to open it, you open the door, you go out the door, you close the door, you get your keys from your pocket, you lock the door......Etc. See what I'm getting at? It'll help you a lot.
     
< Need some ideas|VB 2010|AHK | how would i.. >


 
 
Adblock breaks this site