ok i have a script for an interpreted language that i use to change large numbers into only 4 bytes inside a file. this is the script:

PHP Code:
{
    var 
valuebytestackMASKinumBytes;
    
    
MASK 255;
    
    
value    argument0;
    
stack    argument1;
    
numBytes argument2;
    
    
//Push the low-order byte on the stack, moving other bytes lower.
    
for (0numBytes+= 1)
    {
        
byte MASK value;
    
        
ds_stack_push(stackbyte);
    
        
value value >> 8;
    }

the problem is the ds_stack, i don't know how i can mock that in c++. I know c++ you can make stacks, but i'm just wondering is there a way to get around it. i don't know how to use a c++ stack very well yet so... any help would be appreciated.