• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sipping
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 5 of 5
    1. #1
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      konsowa's Avatar
      Join Date
      May 2012
      Posts
      184
      Thanks (-->)
      1
      Thanks (<--)
      2

      Arrays in a nutshell!!

      How to Manual Map DLL
      Hey i just thought id give out some knowledge for those of you who have just started learning the language.
      Lets Begin.

      So as you all know when programming one will often use variables in which important values are stored. So most of you probably already know what a variable is but just for those of you who don't, a variable is basically a memory storage location in which you may store various data. These variables can be of many different types, such as ints, booleans, strings, and even chars just to name a few. Now moving on to the main topic arrays. Arrays can be described as a group of variables that all have the same type. An important thing to note is that every array has to have a defined size. So if you have an array with 10 elements, it will always have 10 places to store data. That data can change of course, but you can never fit another element inside the array itself. One more thing to note before moving on to examples is that arrays are 0 indexed that means we start counting from zero, don't worry if you don't get it right now you will probably see what i mean in the examples.

      Now to create an array you must declare its type followed by brackets, then supply its name. Like so:

      Code:
      int&#91;] myInts;
      See how easy that was?
      You just created your first array, Cheers.

      One thing to note though is that the array you have just created is not initialized, to initialize it follow this example:

      Code:
      int&#91;] myInts = new int[5];
      Now what you just did is you created an array that has a size of 5. This allows you to store any integer value in any of the elements in the array.

      In the next example you will learn how you can give your elements an initialized value, just follow my lead:

      Code:
      int&#91;] myInts = new int[10] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
      What you have just done is that you've given each of the 10 elements a starting value. We will use this example again in a moment.

      Now lets say you wish to output the value of the element to the user of your application, lets say you wish to output the value of the second element from the last example to the user. How would you go about doing that? The solution is very easy.

      To get the value of the second element all you need to do is the following:

      Code:
      myInts[1]
      Thought i was gonna put the number 2 there didn't you, well remember when i said arrays where zero indexed? This is what i meant.

      So basically to get the value of the first element all you need to do is myInts[0], simple huh?

      Now as you might have noticed, that is inappropriate code so how can i output it in a console window you ask, here is how:

      Code:
      Console.WriteLine(myInts[7].ToString());
      Now disregarding the ".ToString()" part which value do you think that line is gonna output??

      I won't give you the answer to that and ill just let you tell me what you think based on what you have learned.



      Well we have reached the end of this tutorial, i hope i was able to help you by giving you the basics about an array

      Konsowa.

    2. #2
      Newbie
      Learning to hack games!
       
      Feeling Normal
       

      Join Date
      May 2012
      Posts
      0
      Thanks (-->)
      0
      Thanks (<--)
      1
      Nice and clean Introduction.

    3. #3
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      konsowa's Avatar
      Join Date
      May 2012
      Posts
      184
      Thanks (-->)
      1
      Thanks (<--)
      2
      Thanks Sleinzel

    4. #4
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Flyjunkie's Avatar
      Join Date
      May 2012
      Posts
      45
      Thanks (-->)
      0
      Thanks (<--)
      0
      Nice little write up there Konsowa...I've repped you for it. Gotta love it when you tell people the number '0' in programming has to be taken into account lol.

      Would be good to see a range of these topics on items such as classes, inheritance, methods, functions e.t.c and even basic principles such as data types, loops e.t.c

    5. #5
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      konsowa's Avatar
      Join Date
      May 2012
      Posts
      184
      Thanks (-->)
      1
      Thanks (<--)
      2
      Cheat Engine Tutorials
      Yea, i was thinking about making tutorials about those concepts..So yea u can expect those from me

    Similar Game Hacker Threads

    1. [Tutorial] How To Bypass VAC Valve Anti Cheat Info
      By [GH]Rake in forum AntiCheat - AntiDebug
      Replies: 9
      Last Post: 02-05-2018, 09:21 PM
    2. [Help] Help with Arrays
      By TBA in forum C / C++ Help
      Replies: 13
      Last Post: 02-29-2016, 12:59 AM
    3. [Tutorial] How to: Pass arrays to functions.
      By simonpaa in forum Game Hacking Tutorials
      Replies: 3
      Last Post: 04-07-2015, 01:21 PM
    4. [Help] Arrays, Vectors, and Iterators
      By Solaire in forum C / C++ Help
      Replies: 7
      Last Post: 09-20-2014, 08:54 PM
    5. Replies: 9
      Last Post: 11-23-2013, 10:43 AM