C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

unsigned int const does not match const unsigned int

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Timo Freiberger
Guest





PostPosted: Sat Oct 30, 2004 2:37 pm    Post subject: unsigned int const does not match const unsigned int Reply with quote



Hi everybody,

when I try to compile a program that uses image Magick++ lib, I get the following error:

error: argument of type `unsigned int (Magick::Image:Smile()
const' does not match `const unsigned int'


here is the code:

// new Image
Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
// this leads to the error:
unsigned int const c = buchstabe.columns;

My first attempt was to use:

PixelPacket *pixel_cache = glyph.getPixels(0,0,glyph.columns,glyph.rows);

but then I get the error:

error: no matching function for call to `Magick::Image::
getPixels(int, int, <unknown type>, <unknown type>)'
/usr/include/Magick++/Image.h:1134: error: candidates are:
MagickLib::PixelPacket* Magick::Image::getPixels(int, int, unsigned int,
unsigned int)


Any help is very apreciated, because i'm stuck on this.

Greetz
Timo
Back to top
Andrew Koenig
Guest





PostPosted: Sat Oct 30, 2004 2:51 pm    Post subject: Re: unsigned int const does not match const unsigned int Reply with quote



"Timo Freiberger" <teamoe (AT) gmx (DOT) de> wrote


Quote:
// new Image
Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
// this leads to the error:
unsigned int const c = buchstabe.columns;

It's hard to know without seeing your header files, but could you be
neglecting to call a function?

That is, could it be that you need to write something like this?

unsigned int const c = buchstabe.columns();

where the parentheses say to call the function?



Back to top
JKop
Guest





PostPosted: Sat Oct 30, 2004 4:31 pm    Post subject: Re: unsigned int const does not match const unsigned int Reply with quote



Andrew Koenig posted:

Quote:
"Timo Freiberger" <teamoe (AT) gmx (DOT) de> wrote in message
news:pan.2004.10.30.14.37.23.422455 (AT) gmx (DOT) de...

// new Image
Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
// this leads to the error: unsigned int const c = buchstabe.columns;

It's hard to know without seeing your header files, but could you be
neglecting to call a function?

That is, could it be that you need to write something like this?

unsigned int const c = buchstabe.columns();

where the parentheses say to call the function?



This seems the likely cuplrit.

The other (but unlikely) possiblity is that "columns" is a member
variable which is a function pointer.


-JKop

Back to top
Bob Hairgrove
Guest





PostPosted: Sat Oct 30, 2004 7:02 pm    Post subject: Re: unsigned int const does not match const unsigned int Reply with quote

On Sat, 30 Oct 2004 16:37:29 +0200, Timo Freiberger <teamoe (AT) gmx (DOT) de>
wrote:

Quote:
Hi everybody,

when I try to compile a program that uses image Magick++ lib, I get the following error:

error: argument of type `unsigned int (Magick::Image:Smile()
const' does not match `const unsigned int'


here is the code:

// new Image
Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
// this leads to the error:
unsigned int const c = buchstabe.columns;

My first attempt was to use:

PixelPacket *pixel_cache = glyph.getPixels(0,0,glyph.columns,glyph.rows);

but then I get the error:

error: no matching function for call to `Magick::Image::
getPixels(int, int, <unknown type>, <unknown type>)'
^^^^ ^^^^

Just a guess ... try this:

PixelPacket *pixel_cache =
glyph.getPixels(0,0,glyph.columns(),glyph.rows());

Quote:
/usr/include/Magick++/Image.h:1134: error: candidates are:
MagickLib::PixelPacket* Magick::Image::getPixels(int, int, unsigned int,
unsigned int)

--
Bob Hairgrove
[email]NoSpamPlease (AT) Home (DOT) com[/email]

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.