我正在使用基本類並嘗試訪問成員函數中的成員字符串數組。我很困惑,因爲字符串數組初始化並沒有任何內存錯誤(博士存儲器)被釋放的時候,如果我只能調用set_words,print_words,並del_words功能: class XWORD {
public:
int vdir;
int len;
int wid;
int nWords;
所以我想寫一個方法,將返回最大面積的對象的索引。這是我目前的方法 private static int findPositionLargestObject(ArrayList <GeometricObject> geoList) {
int maxIndexC = 0;
int maxIndexR = 0;
for (GeometricObject o: geoLis