next up previous contents
Next: DeleteAt Up: Cell methods Previous: Cell methods

ClearAt

NAME ClearAt

PROTOTYPE

#include "SSTable.h"

int SSTable::ClearAt(int colIndex, int rowIndex);

EXAMPLE

#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);
  }
}
PURPOSE

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.

RECEIVES

colIndex The index of the column of the cell to be cleared.
rowIndex The index of the row of the cell to be cleared.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

See also: DeleteAt



Olivera Tosic
12/17/1999