|
From: Freedrive101 <fre...@gm...> - 2007-08-07 22:19:43
|
> Off-topic C++ advise: I suggest you avoid raw pointers;you could use a > boost shared array to hold the pointer to your raw arrays which would > mean you would not need to explicitly free your data (see > http://www.boost.org/libs/smart_ptr/smart_ptr.htm for more info). thx for this suggestion i agree that smart pointers make life a lot easier but if i encapsulate the pointer in a class iam not sure if the overhead is necessary... maybe i will change the raw pointer to a shared one > Alternatively - unless you really really think you can write a vector > better than C++ compiler implementors - consider using an STL vector to > contain your data; i think i like to reinvent the wheel.. i know that might be a weakness but i learn a lot about data structures that way (i hope) i finally found the source of my problem: i did not overload the assignment operator (a problem that could have been avoided with shared pointers) |