Getting started with c++ menu

User Tag List

Results 1 to 3 of 3
  1. #1
    EnergyForce's Avatar Private
    Reputation
    2
    Join Date
    Sep 2010
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting started with c++

    Attention: Since i am a member of a lot of communitys you may see my guides often but if it is not posted by blaze or energyforce you can be sure someone stole it.
    Also i use the german Visual Studio so you have to translate the words you dont know or compare the screenshots with your screen :]

    Getting Started with c++

    Requirements:
    - Visual Studio 2010 *
    (create, edit, run and compile your project)
    - Notepad++
    (edit single code files)

    Lets configure Visual Studio

    1. Download and install Visual Studio 2010 Express or Professional. Leave all install settings like they are and you are good to go.

    2. For this step i have made a couple of screenshots which say more than 1000 words (imageshack)
    (.cpp files contain c++ source code. A project contains many different files which work together as a whole program. .cpp files are part of a project)

    3. If your project is ready to run you can test compile it with strg+f5. As soon as an Error appears the compiler ends the process and throw an exception which you can see in the white box at the bottom of Visual Studio



    4. If the test run ends without an exception you can build your program with the f7 key. Navigate to your storage location. You will see a new folder which contains both every different file used by your project and the compiled exe.

    Lets write a bit code

    Our first program will launch the command line and print "Hello World".
    The source looks like this



    using namespace std;

    this line will give us acces to the namespace std. You can imagine a namespace as some kind of a three:
    namespace = roots
    directories = branches
    Objects (Attributes and Methodes) = leaves

    #include <iostream>

    this will include the headerfile <iostream>.
    Headerfiles contain declarations of Methods and Functions

    int main()
    {
    }


    This is a function which we named main().
    main is if not other definied the starting point of a program.
    int declares the returnvalue of the function (in this case 0).

    cout << "Hello World" << endl;

    cout is an object or a method of the namespace std.
    cout is used to display text in the command line. it can also look like this

    cout << "Hello " << x << " how are you?";

    Using Variables



    int is the datatype of the variable. Int is used for plain numbers. There are several other Datatytpes

    bool 0 or 1, true or false, yes or no ...
    double used for long numbers which contains numbers after the comma
    string a word for example
    char your variable can hold one char

    x is the name of the variable
    the operator = assign the 10 to the variable x
    Operators are +, -, = and all other chars which do an operation with your code :].

    I think most of you will now variables from math

    x = 10
    x + 10 = 20


    What you should know else

    c++ is NOT a "scripting language". You write code and not "scripts"!!!!! Scripts are used as a runtime by other programs!
    Sourcecode is translated to native machinecode or bytecode which our machine can read and execute.

    Now you can use Visual Studio and create your own easy programs but if you want to learn memory reading (as example) i advice you to go deeper into the matter.
    How much bits are a byte?
    How much bits are used by the different datatypes (int, char and so on)?
    Such things are important to know but for the first time its ok to only know about what you see on your screen.

    After all i am also a total beginner but i will fight my way through all this partly boring stuff. In the future i will release many more guides.

    Since i am german my english is not the best. Please correct me per pm if i made any mistakes. Its my goal to get better and for this i need your help.

    What you can except in my next guides

    if and else
    manipulators
    ascii
    Last edited by EnergyForce; 12-04-2010 at 04:09 PM.

    Getting started with c++
  2. #2
    EnergyForce's Avatar Private
    Reputation
    2
    Join Date
    Sep 2010
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ... ok seems like no one need this

  3. #3
    JD's Avatar Fedora Potato Johnson V
    Reputation
    1113
    Join Date
    Jan 2008
    Posts
    3,129
    Thanks G/R
    12/89
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    YouTube - antiRTFM's Channel <-- That's a little more visual Thanks for the effort tho




Similar Threads

  1. [Release] [C#] Getting started with making bots
    By Aethon in forum WoW Memory Editing
    Replies: 11
    Last Post: 12-26-2011, 08:12 AM
  2. Getting started with pathing?
    By miceiken in forum WoW Memory Editing
    Replies: 9
    Last Post: 01-08-2011, 05:41 AM
  3. Replies: 47
    Last Post: 03-09-2010, 11:25 AM
  4. [Need Help] get started with C#
    By 96engvall in forum Programming
    Replies: 6
    Last Post: 07-22-2009, 10:09 PM
  5. [Question] Getting started with modelediting?
    By Ezelaap in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 04-03-2009, 12:37 PM
All times are GMT -5. The time now is 09:02 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search