|
-
June 28th, 2012, 02:30 AM
#1
auto_ptr
Hi,
I have a few questions regarding this auto_ptr
1) I should only use auto_ptr within a function??
2) Can i use auto_ptr<int> or auto_ptr<SomeClass> in a class?
example:
Code:
class Test
{
private:
auto_ptr<int> ptrData;
}
If not why?
3)auto_ptr<std::vector> vec1 for example, why is it after copying such as
auto_ptr<std::vecotr> vec2(vec1), vec2 becomes unmodifiable? how to get around this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|