Difference between revisions of "Hints for OOP344 Assignment 1"
Line 7: | Line 7: | ||
#- If ESCAPE is hit, copy the content of allocated memory back to str. | #- If ESCAPE is hit, copy the content of allocated memory back to str. | ||
#-<span style="color:#FF0000"><b> Make sure before the function ends, deallocates the allocated memory.</b></span> | #-<span style="color:#FF0000"><b> Make sure before the function ends, deallocates the allocated memory.</b></span> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | =Contributor= | ||
+ | Ryan Dang |
Revision as of 16:06, 22 September 2011
OOP344 - 20113
ESCAPE KEY:
- - Allocate memory to size of strlen(str).
- -copy the content of str into allocated memory.
- - If ESCAPE is hit, copy the content of allocated memory back to str.
- - Make sure before the function ends, deallocates the allocated memory.
Contributor
Ryan Dang