Open main menu

CDOT Wiki β

Changes

OOP344 Assignment Two

1 byte added, 08:32, 6 November 2009
m
Constructors: - minor spelling fix (in sample code block)
IO_Edit can be created in two ways:
<big><pre>
IO_Edit::O_EditIO_Edit(int row, int col, int fieldlen,
int maxdatalen, int* insertmode,
bool framed = false, const char* frameChars = (const char*)0);
</pre></big>
This constructor dynamically creates an array of '''maxdatalen''' + 1 chars (an empty string) and sets IO_FeildIO_Field::_data to point to it.
'''row and col and frameChars''' will be passed directly to the Frame class's '''top and left and frameChars''', respectively. But since a IO_Frame needs to surround the edit field, it has to have one char extra for each side. Therefore, (fieldlen + 2) should be passed to IO_Frame as width and 3 should be passed to IO_Frame as height.
1
edit