C言語やC++では、配列を関数の戻り値として返すことができません。 // error: Function cannot return array type 'int [3]' // error: Brackets are not allowed here; to declare an array, place the brackets after the identifier int [3] getDate() { return {2016, 2, 29}; } // error: Function cannot return array type 'int [3]' int getDate()[3] { int a[3] = {2017, 11, 28}; return a; // error: Cannot initialize return object of type 'int'