Open main menu

CDOT Wiki β

Changes

Project A2 20141 - OOP344

571 bytes added, 20:30, 11 March 2014
CLine: Added blurb about always allocating memory dynamically
== CLine ==
=== Constructors ===
* Both constructors should accept a '''<u>bool*</u>''' and '''NOT''' a <u>bool</u> for '''insert mode'''. Updated descriptions follow:
==== Constructor 1 ====
* '''bool*''' - the insert mode for the line field
...
 
* Both constructors should '''cause memory to be allocated dynamically'''.<br/><br/>In the BTP300 spec, it mentions that the first constructor "passes the address of the data string directly to the CField constructor without allocating any further memory.". Please '''ignore that remark''' and allocated memory dynamically anyway and '''copy''' the contents of the incoming data string '''into''' the memory that you are dynamically allocating.<br/><br/>For the rest of the spec, you can now '''assume''' that your CLine object will have dynamically allocated memory.
= Big Picture, Clarifications, Recommendations =