by: Douglas Peterson |
last post by:
Take a look at this code, it looks funny as its written to be as short as
possible:
-- code --
struct Base
{
~Base() { *((char*)0) = 0; }
};
struct Derived : public Base
|
by: tuvok |
last post by:
Is it correct that the virtual dtor of base gets called implicitly?
Here's some code to demonstrate what I mean:
Class B has a virtual destructor, so has class D which
is derived from B. Deleting...
|
by: Justin |
last post by:
Hello, first time posting.
If I have a base class and a derived class, is there only one way to
call the base constructor?
i.e. Is this the only way I can call the base constructor...
|
by: Jo Vermeulen |
last post by:
Hello,
I was wondering how I could call the base class constructor from a derived
class constructor. In Java I could do something like
super(parameter);
I tried
base(parameter);
|
by: hazz |
last post by:
I have a class/constructor hiearchy that functions correctly as illustrated
below (thanks to Ken Kolda's earlier newsgroup assistance.) If a client
instantiates object D, eg. D m_D = new...
|
by: Alex Vinokur |
last post by:
Microsoft C++ Version 13.10.3077
Why is virtual function init() called in constructor here?
====== foo.cpp ======
#include "iostream"
using namespace std;
class Base
{
|
by: Mike - EMAIL IGNORED |
last post by:
I have a class that may or may not be inherited.
Its constructor calls a function that should be
called only if the class is not inherited. Is
there a way to tell, other than simply passing
a...
|
by: Fedor Semenov |
last post by:
How can I call a base class' constructor from a derived class. Suppose I
have:
class Button // Base class
{
public:
Button(void)
{
// Register classes, create the button, etc.
}
};
|
by: hurcan solter |
last post by:
Consider the code fragment;
class A
{
public:
A(){}
A(int prm):mprm(prm){}
int mprm;
};
class B:public A
{
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|