Hints for OOP344 Assignment 1

From CDOT Wiki
Revision as of 23:16, 22 September 2011 by Qtdang1 (talk | contribs)
Jump to: navigation, search

OOP344 - 20113


  1. - Allocate memory to size of strlen(str).
  2. -copy the content of str into allocated memory.
  3. - If ESCAPE is hit, copy the content of allocated memory back to str.
  4. - Make sure before the function ends, deallocates the allocated memory.


Diagram link: http://i282.photobucket.com/albums/kk241/Kamunist/oop_diagram.png I am not the owner of the diagram above. I just want to explain it.

  • The string will initially start at coordination(column,row).
  • Offset is an integer that show how many characters are hidden.
  • FieldLength is the length of the display box. It decide the maximum number of character you want to display.
  • CurPos is the cursor position within the display box. For example, if your FieldLength is 10, your cursor position can be from 1-10.