|
by: qazmlp |
last post by:
class base
{
// other members
public:
virtual ~base()
{
}
virtual void virtualMethod1()=0 ;
virtual void virtualMethod2()=0 ;
virtual void virtualMethod3()=0 ;
|
by: Marcin Kalicinski |
last post by:
Hi,
Because public inheritance should be used to model is-a relationship, is it
evil from a design point of view to disallow some operations from base
class?
class Derived: public Base
{
/* ... */
private:
|
by: Jonathan Potter |
last post by:
Hi, I was wondering if someone could explain something to me.
We recently upgraded to a new C++ compiler and found some old code wouldn't
compile.
Boiled down, the code that causes the error is:
class A
{
};
|
by: Martin Vorbrodt |
last post by:
Example code in one of my books intrigues me:
class B {
public:
B* Clone() const {
B* p = DoClone();
assert(typeid(*p) == typeid(*this));
return p;
}
|
by: Jason Shohet |
last post by:
A label on an ascx control has a corresponding declaration in the c#
code-behind page.
I was curious what would happen if I made that declaration 'PRIVATE' instead
of 'PROTECTED'.
The only things that touch that label are functions in that code-behind page
itself -- nothing on the outside.
Basically, it doesn't work. Only when I changed it back to 'protected' in
the ascx's cs page, could I modify the text in the label, from within...
|
|
by: pragtideep |
last post by:
I am trying to understand the following code kindly help me
#include<iostream>
using namespace std;
class base {
private:
~base() {cout << "This is base destructor"<<endl ;}
friend class drived;
public:
base() {cout<<"I am base constructor"<<endl;}
virtual void test1() {cout << "i am base virtual method " <<endl;}
|
by: Paul |
last post by:
Hello All,
I am new to C# and dot NET in general. The book I am reading uses the
term "non-public."
I suspect that they don't mean "private", otherwise they would have
said so. What is the difference between "non-public" and "private"?
Help is always appreciated. Thanks,
Paul
|
by: WXS |
last post by:
I know this sounds contrary to the idea of an interface, but read this and
see what you think.
-----------------------------------------------------------------------------------------
It would be nice if there was a way for a class to create a special type of
interface, a private one. Private meaning it's not directly exposed at the
class level, you need to be explicitly handed a reference to it by the class.
Often the encapsulation issue...
|
by: Israel |
last post by:
Can someone explain to me why I get a compiler error with the
following code on the line obj.DoSomething()?
but if cast the object I get no error. The error I get is:
Cannot access protected member
'GenericDerivedClassTest.Base.DoSomething()' via a qualifier of type
'GenericDerivedClassTest.Base'; the qualifier must be of type
'GenericDerivedClassTest.TBase<DerivedType>' (or derived from it)
Why does it believe the object has to derive...
|
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: 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: 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: 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: 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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|