arrays as parameters to functions
-
morning I´d like to know how I can pass arrays as parameters to functions in VC++. (I´m a beginner to VC++, and have all the methods inside one class) When I try, I get an error message saying that the array must specify __gc or __nogc. However, trying to declare the funtion like this:
bool function(__gc char array[]){return true;}
I get a msg saying that __gc can only be applied to an array !! How should I declare the array in the firs place, and how should it be declared in the parameter list? doneirik -
morning I´d like to know how I can pass arrays as parameters to functions in VC++. (I´m a beginner to VC++, and have all the methods inside one class) When I try, I get an error message saying that the array must specify __gc or __nogc. However, trying to declare the funtion like this:
bool function(__gc char array[]){return true;}
I get a msg saying that __gc can only be applied to an array !! How should I declare the array in the firs place, and how should it be declared in the parameter list? doneirikSomething like:
void function( char arr[] )
{
}void main( void )
{
char arr[5] = {'h', 'e', 'l', 'l', 'o'};
function(arr);
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow