Hi guys,
is it possible in C++ to allocate a memory-space like in PureBasic and write and read peaces of data like in PureBasic similar to the Peek* and Poke* functions?
I mean that you can write and read in the same memory block also with for sample PeekA and PeekL and PeekD and PokeB, PokeF, PokeQ etc.?
In C/C++ i see the memory allocation is directly pre-declared for a specific unit-size like this sample here:
int * foo = new int [5];
This sample hat the problem, i guess, that you can only read and write int???
I need a flexible way like in PureBasic. Has anyone an idea?
Memory Allocation Question
Re: Memory Allocation Question
http://www.cplusplus.com/reference/cstdlib/malloc/
http://stackoverflow.com/questions/1845 ... loc-vs-new
c ya,
nco2k
http://stackoverflow.com/questions/1845 ... loc-vs-new
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf