Re: A little help please
From: Alwyn (alwyn_at_blueyonder.co.uk)
Date: 12/28/04
- Next message: Alwyn: "Re: A little help please"
- Previous message: Chris \( Val \): "Re: A little help please"
- In reply to: Rich: "Re: A little help please"
- Next in thread: Alwyn: "Re: A little help please"
- Reply: Alwyn: "Re: A little help please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Dec 2004 13:48:44 +0000
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 am well and truly stuck!!
What was wrong with my solution? If you really must have the 'static_cast'
to 'void *', just subsitute:
void *vptr = static_cast<void*>(arrX);
func1(vptr, sizeof(arrX), '\010');
for
func1(arrX, sizeof(arrX), '\010');
and it should be doing everything the question asked.
Do I think this is a good way to learn C++? No, I don't, but in order to
complete a course successfully, you have to do everything the teacher
asked for. Real learning can come after.
Alwyn
- Next message: Alwyn: "Re: A little help please"
- Previous message: Chris \( Val \): "Re: A little help please"
- In reply to: Rich: "Re: A little help please"
- Next in thread: Alwyn: "Re: A little help please"
- Reply: Alwyn: "Re: A little help please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|