Code inside a function
Let say, that i have defined the same function for windows and mac, with 

different return values

like this:


    #ifdef _WIN32
    
    // Windows code
    
    int porting(int input){
    
    return input + 360;
    
    }
    
    
    #endif
    
    #ifdef __APPLE__
    
    // Mac code
    
    int porting(int input){
    
    return input + 180;
    
    }
    
    #endif




I know that, to use the function… i have to say :  porting(1 // just example);, but how do i place a code/re-define that wasn't inside there to start with?


something like:


    int porting(1){
    
    
    while(1){
    
    // this what i mean
    
    }
    
    }

ofc i could have placed, that in the start, but i want to be able to put it myself later..

my english is not that good, but i tried to explain at my best... please help me out guys

Code inside a function
===

Let say, that i have defined the same function for windows and mac, with 

different return values

like this:


    #ifdef _WIN32
    
    // Windows code
    
    int porting(int input){
    
    return input + 360;
    
    }
    
    
    #endif
    
    #ifdef __APPLE__
    
    // Mac code
    
    int porting(int input){
    
    return input + 180;
    
    }
    
    #endif




I know that, to use the function… i have to say :  porting(1 // just example);, but how do i place a code/re-define that wasn't inside there to start with?


something like:


    int porting(1){
    
    
    while(1){
    
    // this what i mean
    
    }
    
    }

ofc i could have placed, that in the start, but i want to be able to put it myself later..

my english is not that good, but i tried to explain at my best... please help me out guys
