0
如何陣列來從函數返回?我要爲這樣的一個效果:
int getArray()
{
return {1, 2, 3, 4, 5};
}
...
int myArray[5] = getArray();
如何陣列來從函數返回?我要爲這樣的一個效果:
int getArray()
{
return {1, 2, 3, 4, 5};
}
...
int myArray[5] = getArray();
另外:http://stackoverflow.com/questions/845819/how-can-i-return-an-array http://stackoverflow.com/questions/2302279/return-an-array-in-c http ://stackoverflow.com/questions/4138660/in-c-how-do-i-return-an-array-of-objects-from-a-function http://stackoverflow.com/questions/4253106/how- can-i-return-an-array-in-c-function – Cascabel 2010-11-30 15:44:46