• Welcome to Valhalla Legends Archive.
 

C++ help plz

Started by WiLD, March 30, 2003, 09:27 PM

Previous topic - Next topic

WiLD

wow thank you again. every1 here is so helpful thank you all. now that i understand those 2 varibles clearly i will understand most bot sources abit more.
Thank you

WiLD
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Banana fanna fo fanna

No typo in my post. VB lets you assume a lot of stuff you can't assume in other languages.

dxoigmn

Quote from: St0rm.iD on April 02, 2003, 08:18 PM
No typo in my post. VB lets you assume a lot of stuff you can't assume in other languages.

I don't want to start a language war, but I'm wondering what that "stuff" is.  Care to elaborate?

Banana fanna fo fanna

That memory is magically handled for you.
Also that it's ok to, say, assign a string to an int.

Yoni

It's not OK to assign a string to an int in VB, but the conversion is indeed much simpler than in, say, C.

Converting from VB to C = "wtf? You have to use a function to copy strings?"

Banana fanna fo fanna

"what's a function?"

Yoni

Naa, VB at least uses the keyword "Function". Maybe "what's a pointer"

Banana fanna fo fanna

I mean, it's not like VB programmers actually make their own functions anyway.

Yoni

If they didn't write their own functions, they wouldn't get very far (not much farther from Label1.Caption="l33tb4wt")

Camel

hey, it's entirely possible to use pointers in vb!
1) manipulating copymemory (not really manipulating -- that is actually the intended use for copymemory, but to a vb programmer it's manipulation ::))
2) VarPtr(), StrPtr(), and ObjPtr()

i mean, why bother doing "str1 = mid(str2, 2)" when you could do "str1 = space(len(str2) - 1) : copymemory str1, strptr(str2) + 1, len(str2) - 1" ?

Grok

That won't work.

Strings in VB are ... well I'll let you try it.

Etheran


Camel

of course it would work
it wouldnt *accomplish* anything, but it would work

c0ol

NO, again im with storm, VB is horrible for you. VB will get u thinking like a retarted monkey, then when u actaully try to code in a real language you will have no idea whats going on.

Camel

well of course you wouldn't want to learn about pointers in vb. that would just be recockulous. it can be confusing enough just learning it in a real language, so it would be 50million times harder in vb. my point was that it is _possible_ to manipulate data with pointers in vb. example:
   VerQueryValue lpbBuffer(0), "\", ffip, dwSize
   CopyMemory ffi, ffip, Len(ffi)

   version = 0
   CopyMemory x, ByVal ffip + 16, 4: version = version Or ((x And &HFF) * (256 ^ 2)) 'LShift(x And &HFF, 8 * 2)
   CopyMemory x, ByVal ffip + 18, 4: version = version Or ((x And &HFF) * (256 ^ 3)) 'LShift(x And &HFF, 8 * 3)
   CopyMemory x, ByVal ffip + 20, 4: version = version Or (x And &HFF)
   CopyMemory x, ByVal ffip + 22, 4: version = version Or ((x And &HFF) * (256 ^ 1)) 'LShift(x And &HFF, 8)


this doesn't write data to an address, it only reads data..but i think you'll get the point

|