You didn't specify a language...
Well let's say I've been missing a couple classes and I need help understanding some of this stuff. Anyone can help me get started and such, itll be great.
Create a class called Character. The class should have the following public member functions:
A function called compare, that accepts as parameters two arrays (of type char), and one size variable (of type int) that indicates the size of both arrays. The function should determine if the contents of the two arrays are the same, then return a value (of type bool) depending on whether the contents are the same (true) or not (false).
You didn't specify a language...
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
if you want it in java.. I'll type it here (sorry, I don't have an eclipse on my PC so I can't copy-paste it from there)
that's just a recursive way I found which is not too hard to write and understandCode:public class Character { //if you need it to be an object - this is the building function public Character () { } //if you don't need to create an object, you may want to type in a 'static' like this //public static boolean compare(char[] a,char[] b,int slots), slots stands for a.length (or b.length, they're the same) public boolean compare(char[] a,char[] b,int slots) { if(slots==0) { return true; } else if(a[slots-1]==b[slots-1]) return true&&compare(a,b,slots -1); return false; } }
hope it'll help you (:
Last edited by dkofek; 11-12-2011 at 12:35 PM.