#include "SSTable.h"
int SSTable::ClearAt(int colIndex, int rowIndex);
#include "SSTable.h"
SSTable * pTable = new SSTable();
... // do table maniputation
// clear all non-diagonal data
for (int i = 0; i < pTable->GetNumColumns(); i++) {
for (int j = 0; j < pTable->GetNumRows(); j++) {
if (i != j)
pTable->ClearAt(i, j);
}
}
ClearAt erases all the data of a particular cell. It does not remove the cell from the table; rather, it keeps a placeholder. Thus, the overall ``shape'' of the table will not change.
| colIndex | The index of the column of the cell to be cleared. |
| rowIndex | The index of the row of the cell to be cleared. |
A negative value indicates an error or warning.
| See also: | DeleteAt |
|---|