|
by: Philip Lawatsch |
last post by:
Hi,
I have some questions about whats written in
http://www.parashift.com/c++-faq-lite/dtors.html#faq-11.14
(Describing some memory pool)
#1 From what i understand this will also work for new x and delete
x, or did i misunderstand something ?
and,
|
by: DarkSpy |
last post by:
Question 1:
class A
{
public:
operator int () { return 10; }
operator int () const { return operator int(); }
operator std::string() { return "abcd"; }
operator std::string() const { return operator std::string(); }
};
|
by: Randy Gordon |
last post by:
Say I do the following:
char **names = new char*;
for (int i = 0; i < 100; i++) {
names = new char;
}
When I'm done with the array of character pointers, how should I delete it?
Like this:
|
by: Lloyd Dupont |
last post by:
(not I use 2.0, so new return a "normal" pointer and gcnew return a managed
one, my question below regarding new concern plain standart C++ allocator)
- if I use the default new operator, are all the instance variable
initialize to NULL / 0 ?
- if there is not enough memory what happend with new ? does it return NULL
or throw an exception?
- if new throw a native C++ exception what happen in Managed C++ ?!
- if there is an exception in...
|
by: kathy |
last post by:
I am using std::vector in my program:
func()
{
std::vector <CMyClass *> vpMyClass;
vpMyClass.push_back(new CMyClass());
vpMyClass.push_back(new CMyClass());
vpMyClass.push_back(new CMyClass());
//???? Required ??????????????//
|
|
by: cedgington |
last post by:
I wanted to take advantage of the large set of functionality offered by
the framework, so for my latest project I'm using managed C++ with .NET
v2. I'm using the gcnew operator in two different ways, and I'm
confused about the lifetime of objects and whether or not I should be
calling delete. Here are two examples:
ref class SYMBOL : public IComparable
{
public:
// Constructor / destructor
|
by: Gonçalo Rodrigues |
last post by:
Hi all,
I am a little confused about the delete operator, so I have a
question. Suppose we have something like
class Base {
public:
void* operator new(std::size_t size);
void operator delete(void* ptr);
|
by: SoftEast |
last post by:
Hi Buddies,
I have read a lot of stuffs regarding not using GOTO statements to opt
a good programming style http://david.tribble.com/text/goto.html].
Can anybody give a particular lines of code which shows harmfullness
of GOTO.
SoftEast...
|
by: Carlo Milanesi |
last post by:
Hello,
I just completed writing an online book about developing efficient
software using the C++ language.
You can find it here: http://en.wikibooks.org/wiki/Optimizing_C%2B%2B
It is a wiki, that is everyone can change it or only add critical
comments to the pages.
Everyone is invited to improve it. But before applying major changes,
please read these guidelines:
http://en.wikibooks.org/wiki/Optimizing_C%2B%2B/Guidelines_for_editors
|
by: EManning |
last post by:
Using A2003. I'm receiving this error when returning from a
"DoCmd.OpenReport..." statement. I have a tab control with a subform
on every tab. The user selects an item from a combobox at the top of
the main form which refreshes all the subforms. If this DoCmd
statement is not executed, then I don't receive the error. I tried a
"DoCmd.OpenQuery..." instead of a report but get the same error.
I want the user to be able to...
|
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: 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: 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: 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: 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
|