473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

removing void*

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
2 1236

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jim Ley | last post by:
Hi, IE has the ability to setExpressions on stylesheets so you can calculate the value of the css property through script. For various reasons I'm wanting to use a side-effect of this to...
6
by: marco_segurini | last post by:
Hi, I like to know if this is a good way to remove 'line 18' from compilation when DBG is not defined (I dislike to wrap 'line 18' using #if/#endif pair) of if there are better ways (always...
12
by: Magix | last post by:
Hi, Everytime I received a fix-length of string, let say 15 (the unused portion will filled with Spaces before receive), I want to remove the Spaces from END until I encounter a non-space char....
6
by: becte | last post by:
I am little bit confused Is this a legal way of removing a substring from a string? What about the second alternative using strcpy, is it ok even though the source and dest. strings overlap? ...
0
by: sameer mowade via .NET 247 | last post by:
Hello All, I have problem while dynamically removing row from the Datagrid which i have added dynamically as shown in the following code snippet. The problem is that while removing dynamically...
24
by: RyanTaylor | last post by:
I have a final coming up later this week in my beginning Java class and my prof has decided to give us possible Javascript code we may have to write. Problem is, we didn't really cover JS and what...
6
by: Niyazi | last post by:
Hi all, What is fastest way removing duplicated value from string array using vb.net? Here is what currently I am doing but the the array contains over 16000 items. And it just do it in 10 or...
13
by: Mumia W. | last post by:
Hello all. I have a C++ program that can count the YOYOs that are in a grid of Y's and O's. For example, this Y O Y O O Y O Y O Y O O Y O Y Y O Y O Y O O Y O O Y Y O Y O
0
by: khalid galal | last post by:
Hi, i am having a problem with removing event handlers, it is when creating nested event handlers (an event handler raising another event handler) where a part of the code is private void...
3
by: humsafar | last post by:
#include <iostream.h> #include <stdlib.h> #include <stdio.h> Class StudyProgram { Public: StudyProgram (); Void add StudyProgram (); Void edit StudyProgram (); Void delete StudyProgram ();
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.