Dear all,
I was reading something on data structures on c++ and in that chapter
it was telling that the same components will be more efficiently
substituted with the STL ones.
So can somebody give me some clues? I think that is better to learn the
STL style than trying to write them with linked lists,pointers and so
on... Maybe I am mistaken at some points, and hope for your
understanding :))
Thanks in advance. 5 1479
utab wrote: Dear all,
I was reading something on data structures on c++ and in that chapter it was telling that the same components will be more efficiently substituted with the STL ones.
If I understand, you are reading a particular book, and it has some
implementations of data structures, similar to those provided in the
STL, and recommend you use the STL ones, rather than the book provided ones.
So can somebody give me some clues? I think that is better to learn the STL style than trying to write them
What is "them"?
with linked lists,pointers and so on... Maybe I am mistaken at some points, and hope for your understanding :))
I'm not sure what you mean. I suspect the book example implementations
are for your learning of data structures, not as a replacement for the
STL ones.
Always use the STL where you can.
Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Ben Pope wrote: If I understand, you are reading a particular book
I am reading the C++ How to Program by Deitel and that has a chapter
called data structures before giving an introduction to STL.
What is "them"?
For example in data structures chapter there are linked list examples
for inserting back and front, stacks for popping, queues and binary
tree examples.
I'm not sure what you mean. I suspect the book example implementations are for your learning of data structures, not as a replacement for the STL ones.
That is for sure. Always use the STL where you can.
Yep got that but this book gives very long examples hard to follow and
understand the basic idea, do you have a better source to understand
the basics. I am planning to use the STL for these data structures
however I would like to learn what is behind as well(at least
basically).
Thanks
utab wrote: do you have a better source to understand the basics. I am planning to use the STL for these data structures however I would like to learn what is behind as well(at least basically).
OK, so you want a book or tutorial on data structures, with a possible
slant towards C++?
Ben Pope
--
I'm not just a number. To many, I'm known as a string...
utab wrote:
.... Yep got that but this book gives very long examples hard to follow and understand the basic idea, do you have a better source to understand the basics. I am planning to use the STL for these data structures however I would like to learn what is behind as well(at least basically).
See "Accelerate d C++" by Koenig & Moo
Jeff
utab wrote: Dear all,
I was reading something on data structures on c++ and in that chapter it was telling that the same components will be more efficiently substituted with the STL ones.
So can somebody give me some clues? I think that is better to learn the STL style than trying to write them with linked lists,pointers and so on... Maybe I am mistaken at some points, and hope for your understanding :))
You should learn how to write your own so that you understand how the
ones in the STL are working and when to best use which container.
Also, there are the rare occasions when an STL container is not
appropriate for your use and you need something different enough that
you have to write your own. Finally, learning data structures and
recursion go hand in hand and recursion is definately useful to know.
So, learn how to make your own....but don't actually do it in real
projects. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: hzy_104 |
last post by:
Please recommend book on data structures for searching(c++)?
|
by: Amit |
last post by:
Hello,
Can any of you recommend a really good book on data structures and more so,
if it relates to STL data structures, and how they are used to build far
more complex data structures.
Thanks.
|
by: el_roachmeister |
last post by:
For being a good web programmer, is a course on data structures
important? It seems php already has built-in functions for what they
teach in a data structures course. On the other hand all universities
seem to teach this class. I tried taking one but just found it too
boring and irrelevant for what I was doing. What are your thoughts?
|
by: Thomas Paul Diffenbach |
last post by:
Can anyone point me to an open source library of /statically
allocated/ data structures?
I'm writing some code that would benefit from trees, preferably self
balancing, but on an embedded system that doesn't offer dynamic
memory allocation (to be clear: no malloc, no realloc), and with
rather tight memory constraints.
Writing my own malloc to do dynamic allocation from some static pool
isn't really an option, for various reasons, not...
|
by: Bart Goeman |
last post by:
Hi,
I have a question about how to put redundant information in data
structures, initialized at compile time. This is often necessary
for performance reasons and can't be done at run time (data
structures are read only)
Ideally one should be able to put the redundant
information there automatically so no mistakes are possible, but in a lot
of case I see no way how to do it.
| |
by: Leszek Taratuta |
last post by:
Hello,
I have several drop-down lists on my ASP.NET page. I need to keep data
sources of these lists in Session State.
What would be the most effective method to serialize this kind of data
structures?
Thanks for any hints,
Leszek Taratuta
|
by: osp |
last post by:
hi to every one....
i just started out with c++ and i think i am
doing well.i use Robert Laffore to study. which book should i use for
data structures ? please help.
thank you
with regards
osp
|
by: efrat |
last post by:
Hello,
I'm planning to use Python in order to teach a DSA (data structures
and algorithms) course in an academic institute. If you could help out
with the following questions, I'd sure appreciate it:
1. What exactly is a Python list? If one writes a, then is the
complexity Theta(n)? If this is O(1), then why was the name "list"
chosen? If this is indeed Theta(n), then what alternative should be
used? (array does not seem suited for...
|
by: Mik0b0 |
last post by:
Hallo to everyone.
This fall I am going to start data structures as a part of C language
course. The problem is I could not find any satisfying tutorial about
structures in C. There are plenty of books about data structures in C+
+ etc., could anyone please recommend me such a C -specific book ? And
another question: are data structures (like stack, structure etc.)
used in C++ identical to those in C and is it possible to use C++
books to...
|
by: jehugaleahsa |
last post by:
Hello:
When developing data structures for C#, there is an obvious
performance hit when utilizing primitive types. For instance, a recent
hash table implementation I wrote works exceedingly fast on strings.
It can run through a million randomly generated strings in less than
half of a second (in most tests). The built-in dictionary class takes
close to 10 seconds. (Just trust my measurements; I don't want to
argue about the correctness...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 we have to send another system
| |