So I am working on an assembly language program that gets input from the user and writes it to a buffer in memory. But first, I gotta write a higher level language program that accomplishes the same.
In assembly, we can use the store byte (sb) instruction. What about c++? Is there something analogues to sb in c++?
I think what your looking for a is a void pointer: void* a;.
This lets you set an address for an object which doesn't necessarily correspond to a type. Then you can unpack it however you like. Maybe someone else can elaborate for you.
The problem with writing to a space in memory defined by a void pointer is that I think the language has problems defining how much memory to reserve.