C/C++
cprg899.txt
Associated article: C++ for...
Tags: C/C++
Published examples accompanying the column by Al Stevens in which he discusses C++ arguments.
C Programming Column
by Al Stevens
Example 1:
(a)
void foo()
{
const Foo* fp = new Foo;
// ...
delete fp;
}
(b)
void foo()
{
const Foo f;
// ...
}
(c)
void bar(const Foo* fp)
{
// ...
delete fp;
}
(d)
void bar(const Foo* fp)
{
// ...
fp->~Foo();
}
1


