sizeof(ages) 為整個陣列的大小20 bytes,除以單一個元素的大小 sizeof(ages[0]) 4 bytes即為陣列長度。 或是用C++17 iterator 函式庫的 std::size() 也可 ...
確定! 回上一頁