|
by: alanrn |
last post by:
I've implemented a number of strongly-typed collections that inherit from
CollectionBase and recently noticed something that I don't fully understand.
CollectionBase defines method RemoveAt(). However, CollectionBase
implements IList which also defines method RemoveAt(). In my collection when
I code my own RemoveAt() method, the compiler issued a warning indicating
that my RemoveAt() must be defined with a "new" keyword. So, to keep...
|
by: seesaw |
last post by:
class A
{
public:
static A* newA() { return new A; }
....
};
In the code, two things not very clear and natural to me:
1. the method newA() is defined as static.
2. newA as a member method of class A IS returning a "new" instance of A
|
by: Rv5 |
last post by:
Rookie c++ question, but Ive spent the last 5 years doing Java, where
everytime I created an object I used new. In c++ I can create my objects
without and its confusing me just a little.
I have a class called polynomial. Its a nothing little class right now,
with just int variables, a basic container class. Im using it as I go
through some tutorials, but in this particular tutorial its telling me to do
polynomial *first = new...
|
by: Mark P |
last post by:
I think my previous posts on this subject are too verbose and are
scaring off replies so I'll keep this one brief:
If I define my own operator new(size_t size) in a class, does that
automatically hide (global) placement new?
Would this prevent STL container classes from working (e.g., does
std::allocator require placement new for its construct() method?)?
Thanks for your help,
|
by: Ola Johansson |
last post by:
Can anyone explain to me a meningfull use of the "new" keyword (Shadows
in VB).
I think i understand how it works fully but i cant figure out why you
would use it. Why would you want to declare a variable in a derived
class with the same name as in the base class but with a diffrent
meaning?
Anyone can think of a scenario for this?
|
|
by: Michael Steidl |
last post by:
I use XMLspy for handling XML files and started testing its feature to generate
C# code from XML Schemas. Now I got stuck in a strange situation: (I have to
add being not a C# geek, only currently looking deeper into C# considering
making more use of it)
I created C# code from a schema with XMLspy 2005 rel 1. This code worked
flawlessly.
Then I moved to XMLspy 2005 rel. 3 and created C# code from exactly the same
schema again - and...
|
by: jht5945 |
last post by:
For example I wrote a function:
function Func()
{
// do something
}
we can call it like:
var obj = new Func(); // call it as a constructor
or
var result = Func(); // call it as a function
|
by: kimiraikkonen |
last post by:
Hi,
I want to use my own context menu strip to navigate a URL within a
"new window", so i disabled IE's (webbrowser control's) native context
menu, and decided to use my own. However i added a
system.diagnostics.process.start("<mybrowser.path>") to context menu
item to open a new window, but the problem is how to transfer right-
clicked URL and navigate it in "new window".
I think i might have used commandline arguments within form_load...
|
by: Jordi |
last post by:
I'm getting the following error:
Software error:
Can't locate object method "new" via package "A::B" at /path/file.cgi line 5.
My code is basically this:
#!/usr/bin/perl -w
use strict;
use warnings;
use A::B;
my $test = new A::B;
|
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: 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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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: 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
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|