Open main menu

CDOT Wiki β

Changes

Project A2 20141 - OOP344

6 bytes added, 20:31, 11 March 2014
Constructors: Added newline
== CLine ==
=== Constructors ===
* 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.<br/> 
* Both constructors should accept a '''<u>bool*</u>''' and '''NOT''' a <u>bool</u> for '''insert mode'''. Updated descriptions follow: