|
by: Grant Edwards |
last post by:
In an interview at http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=273
Alan Kay said something I really liked, and I think it applies
equally well to Python as well as the languages mentioned:
I characterized one way of looking at languages in this
way: a lot of them are either the agglutination of features
or they're a...
|
by: Ernst Murnleitner |
last post by:
Hello,
is it possible to derive from std::vector and derive also its iterator?
If I do it like in the example below, I get a problem when I need the begin
of the vector:
begin() returns the derived iterator. I need the derived iterator in order
to overload the operator++. But I want to use also
std::vector<PBaseItem>::begin() in order...
|
by: Mark P |
last post by:
Is it guaranteed that STL iterators are aggregate types and can thus be
derived from?
I'm thinking along the lines of, for example:
class DerIter : public std::vector<int>::iterator
{...};
My concern is whether the standard might allow an implementation to use
a bare pointer as an iterator.
|
by: Lorenzo Castelli |
last post by:
This is an old problem of mine.
Basically I have an abstract base class which represents a generic iterator
over a collection of elements, and various derived classes that implement
the traversing on specific data structures.
For each iterator I want to be able to specify the four possible const
combinations, corresponding to the various ...
|
by: T.A. |
last post by:
I understand why it is not safe to inherit from STL containers, but I have
found (in SGI STL documentation) that for example bidirectional_iterator
class can be used to create your own iterator classes by inheriting from
it, ie.
class my_bidirectional_iterator : public bidirectional_iterator<double>
{
...
};
|
|
by: jayesah |
last post by:
Hi All,
List and its iterator work as following way :
list<intmylist;
list<int>::iterator itr;
itr = mylist.begin();
cout << (*itr);
But I want something like this:
|
by: Belebele |
last post by:
I have an Element class which is abstract and I would like to have an
object of the Iterator class to iterate over a range of elements.
I would like to use std::for_each to instrument the iteration, which
forces me to have certain interface on the Iterator class.
struct Element {
virtual ~Element() = 0;
};
|
by: propokergrad |
last post by:
Hello, say I have two classes:
class Base{...};
class Derived : public Base{...}
I would like to do something similar to this:
std::vector<Base*>::iterator b;
std::vector<Derived*>::iterator d;
|
by: Ralf Goertz |
last post by:
Hi,
the following templated code doesn't compile. It gives the error:
template_it.cc:17: error: type 'std::vector<Derived1<T>*,
std::allocator<Derived1<T>*' is not derived from type 'Derived2<T>'
template_it.cc:17: error: expected ';' before 'vi'
However, the same code compiles fine when I don't use any templates.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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...
|
|
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...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|