Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int *returnVector(int &dimension) {
dimension = 100;
int *ret = new int[dimension];
return ret;
};
void main()
{ int dim,i;
int *vec = returnVector(dim);
for (i = 0; i < dim; i++)
printf("vec[%d] = %d\n",i,vec[i]);
getch();
}
int *returnVector(int &dimension) {
dimension = 100;
int *ret = new int[dimension];
int i;
for (i = 0; i < dimension; i++)
ret[i] = i;
return ret;
};
void main()
{ int dim,i;
int *vec = returnVector(dim);
for (i = 0; i < dim; i++)
printf("vec[%d] = %d\n",i,vec[i]);
getch();
delete vec;
}