List:MySQL++« Previous MessageNext Message »
From:Mickaël Wolff Date:September 28 2008 12:40pm
Subject:Re: Fwd: possible bug
View as plain text  
Izzy a écrit :
> why shouldn't I use them? With the arrays I have direct access to
> memory location of the array,
  This is the problem, you have to understand why it doesn't work ;) I 
attach an example of code that don't run as expected. The explanation is 
the objects stored in the array are accessed like based object and not 
as the real object type. This break everything. I guess you are in the 
same trouble.
>  while using containers looping with iterators take a precious CPU time.
  Maybe because it makes the work you didn't when allocating you're array ?

>  But this is another thing, programing style and
> preferance of using or STL or simple arrays. It should work with both,
> but it didn't.
  No, It couldn't, you seen it :) In the boost project, it was added 
boost::array<> template, to provide a safe-type c-array style.

  It is not a programming style, it is about well programming in C++. 
Actually, it is considered harmfull to use widely the new operator, and 
it is worse to use new [] operator.

Mickaël Wolff aka Lupus Michaelis

Attachment: [text/x-c++src] array.cpp
Fwd: possible bugJim Graf26 Sep
  • Re: Fwd: possible bugMickaël Wolff26 Sep
    • Re: Fwd: possible bugIzzy28 Sep
      • Re: Fwd: possible bugMickaël Wolff28 Sep
      • Re: Fwd: possible bugJoel Fielder29 Sep
        • Re: Fwd: possible bugRick Gutleber29 Sep
          • Re: Fwd: possible bugJoseph Artsimovich29 Sep
          • Re: Fwd: possible bugAndrew Sayers29 Sep
          • Re: Fwd: possible bugIzzy29 Sep