|
by: Chris Croughton |
last post by:
What do people call their factory functions? 'new' is not an option
(yes, it can be overloaded but has to return void*).
The context is:
class MyClass
{
public:
// Factory functions
static MyClass* new(int);
|
by: Catalin Marinas |
last post by:
Hi,
Sorry if this was previously discussed but it's something I miss in
Python. I get around this using isinstance() but it would be cleaner
to have separate functions with the same name but different argument
types. I think the idea gets quite close to the Lisp/CLOS
implementation of methods.
Below is just simple implementation example (and class functions are
not supported) but it can be further extended/optimised/modified for
|
by: shablool |
last post by:
Hi all,
Could someone please explain what is wrong with this code (the compiler
complains about "'int_type' is not a member of 'B'"):
struct B;
template <typename DerivedT>
struct A
{
|
by: Alf P. Steinbach |
last post by:
So, I got the itch to write something more...
I apologize for not doing more on the attempted "Correct C++ Tutorial"
earlier, but there were reasons.
This is an UNFINISHED and RAW document, and at the end there is even pure
mindstorming text left in, but already I think it can be very useful.
<url: http://home.no.net/dubjai/win32cpptut/special/pointers/preview/pointers_01__alpha.doc.pdf>.
|
by: rwf_20 |
last post by:
I just wanted to throw this up here in case anyone smarter than me has
a suggestion/workaround:
Problem:
I have a classic producer/consumer system which accepts 'commands' from
a socket and 'executes' them. Obviously, each different command (there
are ~20 currently) has its own needed functionality. The dream goal
here would be to remove all knowledge of the nature of the command at
runtime. That is, I don't want ANY switch/cases...
|
|
by: Jerad Rose |
last post by:
I'm relatively new to C# and polymorphism, so what I'm trying to accomplish
may not be possible, or there may be a totally different approach that I
should be taking.
I have a base class (MyBase) and a collection of MyBase objects
(MyBaseCollection). Now, I also have an extension to MyBase (MyExtendedBase
: MyBase) that has additional properties. And lastly, I have a collection
of MyExtendedBase objects(MyExtendedBaseCollection :...
|
by: Seigfried |
last post by:
I have to write a paper about object oriented programming and I'm doing
some reading to make sure I understand it. In a book I'm reading,
however, polymorphism is defined as:
"the ability of two different objects to respond to the same request
message in their own unique way"
I thought that it was:
"the ability of same object to respond to different messages in
|
by: alexander.stippler |
last post by:
Hello,
I need on the one hand static polymorphism for efficiency concerns,
e.g.
template <typename P>
class Problem
{
public:
const P &
|
by: Vince Castellano |
last post by:
Hello,
I have a set of DLLs that implement different configurations of the
same API. Consider them as first.dll, second.dll, and third.dll. They
all share a common API, calling pattern, and have the same logic to
handle the calls. Calls in the VB.net code does not call the DLLs
directly, but rather a custom dll wrapper class, so that the logic can
be made for the VB code in the abstraction class.
Initially, my idea was to create a...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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.
|