|
by: Alexander Tulai |
last post by:
Hi,
I've started using Java recently so the question may seem trivial.
Is it possible to get rid of an object by simply creating a method (let's
call it "die") in which one simply includes the instruction: "this = null;"
? Would that work if the object has been previously placed in a list of
similar objects? Do I need to go and delete it from the list or simply that
list would now reference a "null" object? If so what would the size() of...
|
by: Robert Hogan |
last post by:
Hello,
I am attempting to send emails using T-SQL (in a SQLServerAgent Job)
using the stored procedure sp_SendSMTPMail. I created the stored proc
using the following script that I got off a post here on google.
CREATE PROCEDURE sp_SendSMTPMail (@From varchar(255),
@To varchar(8000),
@Subject varchar(255),
@Body varchar(8000),
|
by: klaus triendl |
last post by:
hi,
recently i discovered a memory leak in our code; after some investigation i
could reduce it to the following problem:
return objects of functions are handled as temporary objects, hence their
dtor is called immediately and not at the end of the function. to be able to
use return objects (to avoid copying) i often assign them to a const
reference.
now, casting a const return object from a function to a non-const reference
to this...
|
by: Olumide |
last post by:
I'm studying Nigel Chapman's Late Night Guide to C++ which I think is
an absolutely fantastic book; however on page 175 (topic: operator
overlaoding), there the following code snippet:
inline MFVec operator+(const MFVec& z1, const MFVec& z2) // Global
function
{
MFVec res = z1;
res += z2
return res; // WHY???
|
by: Matthias Kaeppler |
last post by:
Hello,
during a discussion on a C++ internet forum, some question came up
regarding references and the lifetime of the objects they alias.
I can't find any clear wording on that in the draft standard. Example
12.2 in the standard document illustrates that temporaries bound to
references-to-const live as long as the reference does.
But does it e.g. matter if the temporary was created in scope of a
function body and has to outlive the...
|
|
by: Jeff |
last post by:
The derived class below passes a reference to an object in its own
class to its base calss constructor. The code compiles and will run
successfully as long as the base class constructor does not attempt to
access the object -- since m_object is not actually created and
initizialized until after the base constructor has been called.
Any thoughts on the practice below?
class Base
{
public:
|
by: Belebele |
last post by:
Suppose that a class A depends on class B because an object of class B
is passed into A's constructor. See below:
class B { ... };
class A {
public:
A(B const& b);
...
};
|
by: removeps-generic |
last post by:
Hi. I'm using placement new to re-initialize part of an object. Is
this OK?
struct BaseImp
{
All& r_all;
BaseImp(All& all) : r_all(all)
};
struct Calc::Imp : public BaseImp
|
by: Andrew Ward |
last post by:
Consider the following:
#include <iostream>
struct X
{
int x;
X() { x = 6; }
};
|
by: subramanian100in |
last post by:
Consider the following program:
#include <iostream>
using namespace std;
class X
{
public:
int value() const { return val; }
|
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: 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: 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: 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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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.
|