|
by: Scott Brady Drummonds |
last post by:
Hi, everyone,
I'm still learning Python as I develop a medium-sized project. From my
previous experience with C++, I've burnt into my mind the notion of
information hiding. I'm having trouble understanding to what extent I
should follow this policy in my Python code so I thought I'd ask the group.
I read from a previous post that to attain a private-like status of member
variables, I should prefix the variable name with two...
|
by: Rajesh Garg |
last post by:
Can we have private constructors and destructors? IF yes what is the
use of such constructors or destructors.....in the sense where can
these be implemented in a system.................
I have an idea that we can have private constructors and destructors
but am not able to find a situation where they can be used...
Regards
RVG
rajeshgarg@opussoft.com
|
by: Me |
last post by:
Hi, I would like learn from people with experience in C++, which of the
following styles of way to construct "get/set" member functions would be the
best in terms of usability, speed, et cetera.
The following class with be used as an example:
class MyClass {
public:
// member function would go here.
private:
int data_;
|
by: Manolis |
last post by:
Hi,
I was wondering if there is any way to make two objects of the same
class to be able to access each other's private data, like this:
class A {
public:
void access( const A& a ) {cout<<"a.value="<<a.value<<endl; }
private:
int value;
|
by: Jeff Grills |
last post by:
I am an experienced C++ programmer with over 12 years of development, and I
think I know C++ quite well. I'm changing jobs at the moment, and I have
about a month between leaving my last job and starting my new one. In that
time, I have decided to learn C#. I picked up the book, "Programming C#
(4th Edition)" recently and have read most of it. I've written about 1,500
lines of C# now, and I've run into the first really ugly thing I...
|
|
by: mystilleef |
last post by:
Hello,
What is the Pythonic way of implementing getters and setters. I've
heard
people say the use of accessors is not Pythonic. But why? And what is
the alternative? I refrain from using them because they smell
"Javaish."
But now my code base is expanding and I'm beginning to appreciate the
wisdom behind them. I welcome example code and illustrations.
|
by: David Veeneman |
last post by:
Should a member variable be passed to a private method in the same class as
a method argument, or should the method simply call the member variable?
For years, I have passed member variables to private methods in the same
class as method arguments. For example, if Public method Foo() calls private
method Bar(), and if Bar() uses member variable m_MyVariable, I declare the
private method with the signature:
private void Bar(SomeType...
|
by: Ethan Kennerly |
last post by:
Hello,
There are a lot of Python mailing lists. I hope this is an appropriate one
for a question on properties.
I am relatively inexperienced user of Python. I came to it to prototype
concepts for videogames. Having programmed in C, scripted in Unix shells,
and scripted in a number of proprietary game scripting languages, I'm
impressed at how well Python meets my needs. In almost all respects, it
does what I've been wishing a...
|
by: psp |
last post by:
I'm really puzzled why this is allowed by the c++ compiler:
class C {
public:
void setNumber( int y ) { m_y = y; }
void printNumber() const { cout << "m_y= " << m_y << endl; }
void copyInt(C &anotherCObj) { m_y = anotherCObj.m_y; }
private:
int m_y;
};
|
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: 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: 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
|