Memory Allocation Question
Posted: Fri Sep 21, 2018 5:38 pm
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?
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?