Especially this one right here "->". But that's just me I guess.
if you'd normally acces something from a normal struct or class you'd use
Code:
testmyclass.testint;
but if we were to create a pointer to that class we'd have to use
Code:
testmyclass->testint = 4;
which could also be written as
Code:
(*testmyclass).testint = 4;
somehow
t
c
l shows up as stars o__O
Originally Posted by Hell_Demon
if you'd normally acces something from a normal struct or class you'd use
Code:
tes***ass.testint;
but if we were to create a pointer to that class we'd have to use
Code:
testptr->testint = 4;
which could also be written as
Code:
*testptr.testint = 4;
Well actually
Code:
(*testptr).testint = 4;
Oh and the :: operator is for scope, so like BA said, namespaces and static stuff.
Which book are you using why06?
Oh and @ black angel, for what i wanted to do to work, i also needed a way to convert back to managed string.
It was, get managed string, convert to std string or char*, convert back to managed string. I managed the second part, just not the third.
Originally Posted by zeco
Well actually
Code:
(*testptr).testint = 4;
Yep, meant that(getting late).
im gonna call it a day, cya guys tomorrow.
all of you ch00bs should listen to b1ackange1, zeco and why06 ^^ you'll become a whole lot wiser from that :P
Originally Posted by Hell_Demon
all of you ch00bs should listen to b1ackange1, zeco and why06 ^^ you'll become a whole lot wiser from that :P
Lol. The only thing I do is ask a whole lot of annoying question xD. Ur the ones answering them. If that makes me wise then I'll be damned. Good night HD.
It's mid-day here, but ur on the otherside of the world.
No Questions = No Learning = Staying Stupid
We coders gotta stick together & help each other out !
Questions are good, it means you're interested.
People with an 'I want to learn gamehacking in C++ please give me all your source code so I can copy+paste and claim it as my own' attitude is what I really hate.
Why06 is a perfect example of someone that asks questions that would actually help him, or another person out(and you can see he is interested and also posts his own code to show you what he has done so far).
JMonking however is one of the people that asks the same question over and over, and in the end ignores everything we said and goes his own way again.
My advice: Listen to those who know what they're doing, listen to their opinions, do NOT try to run before you can walk(so no making hacks untill you've learned the basics of a language).
One last note: It's way more satisfying when you can make your own hacks, especially if you can share it with others. if you copy paste and are still a retard at the end of the run it will have no use at all.
Thanks for reading,
Hell_Demon(aka R3B3L and TehKiller)
P.S. this is just my 2 cents, do whatever you wish with this information ^^
Amen to that!
Nothing worse than a CopyPaste 'Dev'....
Yeah i agree. Asking questions is a great way to learn. Hmm i should post little projects once in a while like why06 >_<. I really need more practice. But i'm bad at thinking of things to do since i'm not creative.
Originally Posted by zeco
Yeah i agree. Asking questions is a great way to learn. Hmm i should post little projects once in a while like why06 >_<. I really need more practice. But i'm bad at thinking of things to do since i'm not creative.
I've actually found a little book of C++ problems. They are little programs with one or two things wrong with them. It's pretty easy stuff not to hard, but keep you on top of your game. I plan to start posting the one about once a day when I move away from beginner stuff and start getting into more technical C++. So I don't forget what I learned while learning ASM and managed C++.
It's Quite Simple really:
MyClass x;
x.DoSomething();
MyClass *y = new MyClass();
y->DoSomething();
MyClass* z = &x;
z->DoSomething();
*z.DoSomething();
You have to use -> when dealing with references/pointers to objects (heap) and '.' when dealing with it directly(stack)
the Double Colon only comes into play with the static stuff & namespaces
Edit: *looks above* yeah that! lol
woah D: Calm down guys.... I got a book. believe it or not I do read. I just said it gives me a lil trouble (looked it up the very second I wrote that. Haha XD) don't need an explanation, but thx anyway I guess o_O
LOL
Ooh, that sounds awesome. Actually finding errors in code has always greatly entertained me. What is the book called?
P.S. Managed C++ rots your brain. It would be better to learn C#.
Except that might greatly confuse you since C# is like half java looking, half C++ ish. So the lines of syntax would probably get too blurred for you to remember xD.
I also think Why06 is a little confuzzled between Managed C++ and plain old Win32 C++
Remember:
C = derived from 'B'
C++ = C + Object Orientation etc
Win32 C++ = windows API using C++
Managed C++ = .NET using C++
C# = .NET using C#
VB.NET = .NET using VB
ASP.NET = ASP using .NET with either VB.NET or C# lol
F# = well.. you can guess (except it's 'functional programming' which is not my cup of tea)
Originally Posted by zeco
Ooh, that sounds awesome. Actually finding errors in code has always greatly entertained me. What is the book called?
P.S. Managed C++ rots your brain. It would be better to learn C#.
Except that might greatly confuse you since C# is like half java looking, half C++ ish. So the lines of syntax would probably get too blurred for you to remember xD.
Lol ur probably right. xD anyway managed isn't that bad, not like I have much of a choice anyway if I want to make an application on windows. All the text is Unicode D:
Originally Posted by B1ackAnge1
I also think Why06 is a little confuzzled between Managed C++ and plain old Win32 C++
What the who now? o_O?!
EDIT:
Yeh. that would be correct. Just got em confused again in my above post D:
xD HAha LOL