|
by: Christopher J. Bottaro |
last post by:
Hello,
Lets say I have a class instance with the following member vars: var1, x,
size. Now lets say I have dict with the following keys: var1, x, size.
Is there an easy way to *automatically* assign all the values in the dict
to corresponding (member) vars of the same name as the dict keys?
Thanks for the help.
|
by: vp |
last post by:
Can I safely assume that all static variables are initialized as NULL
or zero, depending on the types of the variables, no matter on which
platform that app is compiled ?
Thanks for your help,
DT
|
by: JM |
last post by:
Hi all, I have a Customers class that can be instantiated with a customerId , which causes private member vars to be populated. But I also want to simply make a call to a static method on the Customers class to get shipping addresses, avoiding the overhead of instantiating the class (with it's SQL customer lookup)
Customers.GetShippingAddresses(customerId
here's the signature
internal static DataSet GetShippingAddresses(int customerId...
|
by: Harald |
last post by:
Hi
My question: I use a few static vars in my site and want to know if their values
interfere between ore than one session.
Sample:
First session: static int x = 10
Second session: static int x = 5
If a third session is started does the value of my static remain its value in all sessions, or is the value the same in all sessions.
I know that this sounds a bit silly but i have problems which look like that is the fault.
|
by: Dave |
last post by:
Are there any issues with concurrency on static methods creating instances
such as in the data access code below? Or if I wanted to expand it to use an
ADO.NET transaction and having two users access this method at the same time?
As I understand it, it would not be an issue because the variables being
referenced aren't static fields and are either created inside the method or
passed in.
In other words is there any real difference...
|
|
by: r.roest |
last post by:
Hi,
I'm looking for a way to fill static vars from a different c-file.
Here is what I want to do:
file1.c
static DEBUG
calling function X using DEBUG to display information
calling function Y using DEBUG to display information
|
by: Bran Kelly |
last post by:
Hi,
I am running into something I haven't ever encountered before. I have a
static instance of a class declared in a cpp file, which seems to be
optimized (or for some other reason) out of existence. It is something like
the following:
foobar.hpp
class foobar
{
|
by: John A Grandy |
last post by:
Say I have Class1 which contains
static Class2 var1 = new Class2();
Is Class2 constructor code only executed if var1 is referenced in the
code-execution path ?
Or is Class2 constructor code executed on load of any class that references
Class1 ?
|
by: Zytan |
last post by:
I see that static is more restricted in C# than in C++. It appears
usable only on classes and methods, and data members, but cannot be
created within a method itself. Surely this is possible in C# in some
way? Or maybe no, because it is similar to a global variable (with its
scope restricted) which C# is dead against?
Zytan
|
by: RishiD |
last post by:
Hi,
I am trying to figure out if the local variables created within a
static member function are created on the heap or stack?
Example:
class Circle
{
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
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...
|