by: john sun |
last post by:
Hi,
I have a class with copy ctor and assignment operator.
MyClasss obj1(data);
MyClass obj2=obj1; in this case, the copy constructor is invoked instead of
assignment operator. I cannot...
|
by: Charles Stapleton |
last post by:
Given the folowing class
class Ctest{
public:
Ctest( int i, int j) :a(i) { b = j; }
private:
int a, b;
}
When creating an object of type Ctest, what advantage is there to setting
|
by: Thomas Lorenz |
last post by:
Hello,
I'm a little confused about object initialization. According to Stroustrup
(The C++ Programming Language, Special Edition, Section 10.2.3) constructor
arguments should be supplied in one...
|
by: Andy Lomax |
last post by:
Is there any difference between:
foo A = B;
and
foo A;
A = B;
Specifically, I have a case where B is a function call which returns a
|
by: skishorev |
last post by:
What is the difference between copy initialization and assignment.
How the memory will allocates the objects.
Thanks ®ards,
Sai Kishore
|
by: lovecreatesbea... |
last post by:
K&R 2, sec 2.4 says: If the variable in question is not automatic, the
initialization is done once only, conceptually before the program
starts executing, ... .
"Non-automatic variables are...
|
by: asdf |
last post by:
The oder of member initialization is the order in which the members are
defined.
So the following code is problematic:
class X{
int i;
int j;
public:
X(int val):j(val),i(j){}
|
by: Jess |
last post by:
Hello,
I understand the default-initialization happens if we don't initialize
an object explicitly. I think for an object of a class type, the
value is determined by the constructor, and for...
|
by: timlyee |
last post by:
int *p = new int;
auto_ptr<intap1 = p; //will fail on 3 1
auto_ptr<intap1(p); //ok 2
*ap1 = 12; // 3
the first situation has called :...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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,...
|
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...
|