473,498 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Utility of vectors

My boss has some beef or other with vectors - he says that they've given him
trouble over the years, and so he uses some template classes he wrote 15 years
ago. My question is, is the standard vector class worthy of such scorn? I
haven't talked to him in-depth about the situation, but I always thought
standard library stuff was good for just about everything...

--
Christopher Benson-Manica | Jumonji giri, for honour.
ataru(at)cyberspace.org |
Jul 19 '05 #1
3 1731
> My boss has some beef or other with vectors - he says that they've
given him trouble over the years, and so he uses some template
classes he wrote 15 years ago.


Templates didn't exist 15 years ago, so your boss could not have
written template classes then.

--
Andrew Koenig, ar*@acm.org
Jul 19 '05 #2
at***@nospam.cyberspace.org wrote:
My boss has some beef or other with vectors - he says that they've given him
trouble over the years, and so he uses some template classes he wrote 15 years
ago. My question is, is the standard vector class worthy of such scorn? I
haven't talked to him in-depth about the situation, but I always thought
standard library stuff was good for just about everything...


A lot has changed in 15 years. I have no idea what problem your boss has
with vectors, but I'm betting that the standard vector class is
considerably better than his templates for most purposes. The standard
library has been very carefully designed, and implementations of it are
usually done by professional library authors who know a thing or two
about writing efficient library code. They are also extensively tested,
so are likely to have fewer bugs.

The standard vector template is a very nice tool. I'd say that any
problems your boss has with it are either his problems, or problems with
some less-than-perfect implementation that's probably not used anymore.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Jul 19 '05 #3
at***@nospam.cyberspace.org wrote:
My boss has some beef or other with vectors - he says that they've given
him trouble over the years, and so he uses some template classes he wrote
15 years ago. My question is, is the standard vector class worthy of
such scorn? I haven't talked to him in-depth about the situation, but I
always thought standard library stuff was good for just about everything...


If your code is already full of this proprietary vector, that would be
a good reason not to use std::vector. Mix-and-matching container
classes adds complexity, and often forces you to copy entire
containers into new ones to fit an API. If the old vector works, it is
probably good enough.

Aside from that possibility, you should consider simple NIH. The world
is full of NIH.

--
Dave O'Hearn
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
15804
by: Michael Aramini | last post by:
I need to represent 1D and 2D arrays of numeric or bool types in a C++ program. The sizes of the arrays in my intended application are dynamic in the sense that they are not known at compile time,...
5
3394
by: Pratyush | last post by:
Hi, Suppose there is a vector of objects of class A, i.e., std::vector<A> vec_A(N); The class A satisifies all the STL vector requirements. Now I wish to add some attributes for each of the...
5
2302
by: Computer Whizz | last post by:
I was reading through Accelerated C++ at work when I read through the first mention of Vectors, giving us certain functions etc. Is there any benefit of Arrays over Vectors? Since all Vectors...
3
3226
by: Amit | last post by:
Hello. I am having some problem organizing a set of vectors. The vectors itself, could contain a pointer( say integer pointer) or could contain another object MyClass. 1>So, first of all, is...
4
1997
by: Dr. J.K. Becker | last post by:
Hi all, I have vectors that holds pointers to other vectors, like so: vector<whatever> x; vector<whatever*> z; z=&x; Now I add something to x
5
18084
by: madhu | last post by:
http://msdn2.microsoft.com/en-us/library/fs5a18ce(VS.80).aspx vector <intv1; v1.push_back( 10 ); //adds 10 to the tail v1.push_back( 20 ); //adds 20 to the tail cout << "The size of v1 is " <<...
2
8663
by: wuzertheloser | last post by:
Use the program skeleton below (starting with #include <stdio.h>) as the starting point for quiz4. Add the necessary code to the functions prob1() and prob2(), and add the other 2 functions, as...
1
2035
by: Rob | last post by:
How would I do this? I want to be able to handle vectors of many different types of data and vectors that can contain any number of other vectors of data. Currently, I have a templated...
2
3382
by: joeme | last post by:
How would one using STL do the following tasks: 1) merge 2 sorted vectors with dupes, result shall be sorted 2) merge 2 sorted vectors without dupes, result shall be sorted 3) merge 2...
0
7125
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
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5462
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,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.