只适用于基本类型 数组的大小 / 数组的类型c c++没有lenght - - (╬▔皿▔)凸 int nums[5]; cout << sizeof(nums) / sizeof(int) << endl; //输出5