List:MySQL++« Previous MessageNext Message »
From:Mickaël Wolff Date:September 26 2008 7:01pm
Subject:Re: Fwd: possible bug
View as plain text  
Jim Graf a écrit :
> Very simple testing shows that:
>
>   mysqlpp::Connection *pCon;
>   pCon = new mysqlpp::Connection[ 20 ];
>
> runs the default Connection constructor, and I might mention, it is
> perfectly valid c++.
[...]
>  If there are any issues with creating and maintaining
> objects in this manner, I am not aware or have forgotten?
>   
  It isn't because it compiles and its grammar is correct that your code 
will run as expected. Some things in C++ are evil, because of backward 
compatibility with the C. Don't use new[] dans delete[] operators, and 
prefer safe containers.

-- 
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

Thread
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