Re: A little help please
From: Alwyn (alwyn_at_blueyonder.co.uk)
Date: 12/28/04
- Next message: Francis Glassborow: "Re: A little help please"
- Previous message: Alwyn: "Re: A little help please"
- In reply to: Alwyn: "Re: A little help please"
- Next in thread: Rich: "Re: A little help please"
- Reply: Rich: "Re: A little help please"
- Reply: Rich: "Re: A little help please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Dec 2004 14:03:11 +0000
On Tue, 28 Dec 2004 13:48:44 +0000, Alwyn wrote:
> On Tue, 28 Dec 2004 12:36:34 +0000, Rich wrote:
>>
>> I think I need to be doing the static_cast again in the function to cast
>> back to an int.
>
> No. 'arrX' is already an array of 'int', so no casting could possibly be
> required.
I think I misunderstood you there. I thought you meant you needed to cast
to 'int' before printing.
Actually, the question says:
> The function should set each byte in the specified range to the value.
To do that, you should cast to 'char *' or 'unsigned char *', which are
both byte-sized.
Anyway, just study my example. I believe it does what is required.
Alwyn
- Next message: Francis Glassborow: "Re: A little help please"
- Previous message: Alwyn: "Re: A little help please"
- In reply to: Alwyn: "Re: A little help please"
- Next in thread: Rich: "Re: A little help please"
- Reply: Rich: "Re: A little help please"
- Reply: Rich: "Re: A little help please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|