Memory Allocation Question

Everything else that doesn't fall into one of the other PB categories.
5mware
User
User
Posts: 30
Joined: Mon Dec 14, 2015 2:14 pm

Memory Allocation Question

Post by 5mware »

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?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: Memory Allocation Question

Post by nco2k »

If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Post Reply