By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,407 Members | 920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,407 IT Pros & Developers. It's quick & easy.

removing void*

P: n/a
Hi,

I was asked to remove the void*'s from an old project.

My idea was to replace them with templates.
Is this a good idea? How would you proceed?

Thanks

Chris
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Christian Christmann" <pl*****@yahoo.de> wrote in message
news:42***********************@newsread4.arcor-online.net...
Hi,

I was asked to remove the void*'s from an old project.

My idea was to replace them with templates.
Is this a good idea? How would you proceed?


There is no pat answer we can give you.

The questions, in each individual case, will be "What is this variable being
used for?", "What type of data does it *really* represent?" and "Is there a
reason that this is declared as void* in the first place?"

It could be that many of those have legitimate uses. Or not. You'll have
to deal with each variable on its own.

Simply being told to "remove all void*s" is rather silly, in my opinion. If
it is felt that the current software is poorly written, then the software in
its entirety needs to be reviewed, documented, and potentially redesigned,
prior to simply making coding changes.

Of course, we do what we're told, most of the time. But honestly, there's
nothing we can tell you about what to use instead of void*, because we have
no idea what each of those cases are.

If you have questions about a specific case or two that stump you, post
those here and we might be able to suggest a better alternative. Otherwise,
it'll be up to you to decide each individual case.

Sorry, but it looks like you've got your work cut out for you.

-Howard
Jul 23 '05 #2

P: n/a
Christian Christmann wrote:
Hi,

I was asked to remove the void*'s from an old project.

My idea was to replace them with templates.
Is this a good idea? How would you proceed?

Thanks

Chris


The initial questions I would ask are:

1. Why were they there in the first place?
2. Why do you want them removed?
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.