cannot pass objects of non-POD type

Eirik Nesje einesje at online.no
Wed Dec 12 01:11:04 PST 2007


thanks, this was a elegant sollution. I were too focused on the Format 
methode instead of checking the operator << to do this.

Regards
Eirik

Vadim Zeitlin skrev:
> On Tue, 11 Dec 2007 22:31:19 +0100 Eirik Nesje <einesje at online.no> wrote:
>
> EN> I have the following statment that works using Visual Studio 7.1 Standard :
>
>  It doesn't. It just miraculously appears to.
>
> EN> wxSQL += wxString::Format(wxT("%d"), file.GetSize());
> EN> 
> EN> (wxSQL is a wxString).
> EN> 
> EN> But using MinGW i get this message :
> EN> 
> EN> *** traverseframe.h:80: warning: cannot pass objects of non-POD type 
> EN> `class wxULongLong' through `...'; call will abort at runtime
>
>  The message is exactly correct. You pass wxULongLong where an int is
> expected (due to "%d"). Don't do this and better yet don't use Format() at
> all unnecessarily: just "wxSQL << file.GetSize()" will suffice.
>
>  Regards,
> VZ
>
>   




More information about the wx-users mailing list