0
Return array from function in cpp
How can I return an array from a function to the main function?
5 Answers
+ 1
int* getArr(int size)
{
int*arr = new int[size];
return arr;
}
int main()
{
int* a = getArr(10);
a[0] = 1;
delete[] a;
}
+ 1
About writing game?
0
check my last post please
0
@Vladislav can u see my last post?
0
No its cpp project ... Please comment on my last post ... bubble sort