Re: auto_ptr array
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Tue, 01 Apr 2008 10:55:39 -0400
George wrote:
Thanks Igor,
Still compile error, how to fix it? I posted my code and compile error below,
[Code]
#include <memory>
using namespace std;
int main()
{
auto_ptr<int> pi[10];
int* p;
for (int i = 0; i < 10; i++)
{
p = new int (i);
pi[i] (p); // error C2064: term does not evaluate to a function taking 1 arguments
}
return 0;
}
[/Code]
George:
pi[i].reset(p);
--
David Wilkinson
Visual C++ MVP
.
- Follow-Ups:
- Re: auto_ptr array
- From: George
- Re: auto_ptr array
- References:
- auto_ptr array
- From: George
- Re: auto_ptr array
- From: Igor Tandetnik
- Re: auto_ptr array
- From: George
- Re: auto_ptr array
- From: Igor Tandetnik
- Re: auto_ptr array
- From: George
- auto_ptr array
- Prev by Date: Re: Writing a .txt file
- Next by Date: Re: Writing a .txt file
- Previous by thread: Re: auto_ptr array
- Next by thread: Re: auto_ptr array
- Index(es):
Relevant Pages
|
Loading