|
Boost : |
From: H (h.v.niekerk_at_[hidden])
Date: 2005-06-22 08:52:02
> I told you that already. You don't need pointers (since you're
> using a factory function to create the instance, you'll need one
> pointer, but the other uses don't have to be pointers).
>
> void function1(FtInterface & fti)
> {
> function2(fti);
> }
>
> int main()
> {
> std::auto_ptr<FtInterface> fti(ftGetIfFromFactor(...));
> function1(*fti);
> }
>
Thank you for this. Question tho: when function1 is in a different .cpp
file than main(), I would still have to declare FtInterface in that .cpp
file, right?
> The bottom line is that your problems stem not from
> boost::shared_ptr usage but from fundamental misunderstandings of
> how C++ works. The Boost Users List or comp.lang.c++.moderated
> are better places to handle such questions. It also appears that
> you need to find a good tutorial on C++ to help you understand
> things better.
As I pointed out when I started this thread, I'm not very experienced
and have been using about 6 different (online) tutorials about C++.
Thank you for your help.
H.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk