RE: [Dev-C++] Pointers and copy constructors
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@em...> - 2003-06-08 12:47:53
|
-----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Socha, David F > Sent: Sunday, June 08, 2003 2:06 PM > To: Dev C++ Mailing List > Subject: [Dev-C++] Pointers and copy constructors > Please define language, C or C++. > item 1: Are pointers passed by value or by reference In C by value, in C++ can be passed in both ways (by reference using templates). > item 2: Would it be a problem if in my copy constructor I > called a function to recursivly move through a binary search > tree and copy the data, keep in mind my BST is made of a > series of linked, dynamically alocated pointers. If it is an external function no, provided that you will not run out of memory. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |