|
by: cppaddict |
last post by:
Is it possible to avoid using push_back repeatedly when initializing a
vector? That is, is there a vector syntax that would be analogous to
the following array initialization syntax:
MyClass myArray = {
MyClass("Stan"),
MyClass("Julie")
};
Thanks for any ideas,
|
by: Matthias Käppler |
last post by:
Hi,
in Nicolai Josuttis book about the C++ standard library, class templates are
defined like this:
template<class T>
class MyClass<T>
{
T value;
};
|
by: bor_kev |
last post by:
Hi,
First of all, i want to use the new managed class syntax and STL.NET
under Microsoft Visual (C++) Studio 2005 Beta.
I read in a Microsoft
article(http://msdn.microsoft.com/VISUALC/default.aspx?pull=/library/en-us/dnvs05/html/stl-netprimer.asp)
that i am suposed to include :
#include <cli/vector>
#include <algorithm>
|
by: Rob |
last post by:
To follow up on the "copy constructor clarification thread"...
The assignment operator syntax shown previously:
MyClass% operator=(const MyClass%);
seems to have problems if you have member properties that need to be copied
from the rhs to the lhs. Since the rhs parameter is "const MyClass", you get
an error C2662 "'MyClass::prop::get' : cannot covert 'this' pointer from
'const MyClass' to 'MyClass %'" if you have code inside like
|
by: Bern McCarty |
last post by:
I am porting stuff from MEC++ syntax to the new C++/CLI syntax. Something
that we did in the old syntax that proved to be very valuable was to make
sure that the finalizer would purposefully generate an assertion failure
for unoptimized, debug builds. We did this to find and fix cases where we
were relying upon finalization rather than pro-active Dispose() calls.
For classes that introduced IDisposable() into the class hierarchy...
|
|
by: Sathyaish |
last post by:
/* I am writing this C# program because I forgot the syntax for
calling a parameterized constructor from a non-parameterized one
within the same class.
I was coding in Java and just typed it like this:
public MyClass(String someParam)
{
}
|
by: =?Utf-8?B?QW5kcmV3?= |
last post by:
Hello, friends,
I tried to have 2 classes in an abstract class, but could not figure out the
syntax. I knew with 1 class the syntax is:
public abstract class MyClass<Twhere T : class
{
}
Then I tried both
|
by: berrylthird |
last post by:
This question was inspired by scripting languages such as JavaScript. In JavaScript, I can access members of a class using array syntax as in the following example:
var myInstance:myClass = new myClass();
myInstance.member_0 = memberValue_0; // absolute notation
myInstance = memberValue_0; // relative notation
myInstance = memberValue_0; // nominal notation
You can initialize a struct in C/C++ like you would an array, as with the...
|
by: REH |
last post by:
It it permissible to use the constructor style cast with primitives
such as "unsigned long"? One of my compilers accepts this syntax, the
other does not. The failing one chokes on the fact that the type is
not a single identifier or keyword. Which one is correct? For example:
unsigned long x = unsigned long(y);
REH
|
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: 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: 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: 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.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|