Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

3.8 Vector Copies

Now let's deal with the problem opposite to Section 3.7. In other words, you have a view of another object's data, but you really want a unique copy. In this case, you can use the copy function. Here is a common situation within functions:

In this example, myCopy and v each refer to their own data, and no aliasing takes place.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.