473,842 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

On Java and C++

Java programmers seem to always be whining about how confusing and
overly complex C++ appears to them. I would like to introduce an
explanation for this. Is it possible that Java programmers simply
aren't smart enough to understand C++?

This is not merely a whimsical hypothesis. Given my experience with
Java programmers --- the code they write and the conversations they
have --- Occam's Razor points to this explanation. For example,

"Oooh I'm confused about the difference between pointers, references,
and objects! How confusing!"

"Oooh operator overloading confuses me! The expression x + y is so
confusing, who knows what's happening with that? If x and y are
complex numbers, what the hell could x + y mean?"

"Oooh multiple inheritance is so confusing! Though I am both a father
and a programmer, I still find it so confusing how the same object can
be two different things! How confusing!"

"Oooh and virtual bases are so bizarre! I am a student --- myself
'the father' is the same student as myself 'the programmer' --- but
nonetheless the idea of virtual bases is absolutely confounding and
confusing to me!"

Again, Occam's Razor is a valuable tool here. In deciding among
competing hypotheses, choose the simplest one. To impartial observers
of indoctrinated Java programmers, the explanation is simple indeed.

Apr 26 '06
458 21553
"Noah Roberts" <ro**********@g mail.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .

Java references are pointers without the benifits of being pointers and
without an explicit notation to label them as such to reduce confusion.


I actually laughed out loud when I read the above. That's very rare for
me. The punchline, that making Java more like C++ would *reduce* confusion,
was very unexpected.

Why would you need explicit notation to differentiate between Foo and
Bar if a given environment has only Foos and no Bars?

- Oliver

May 5 '06 #411
Noah Roberts <ro**********@g mail.com> wrote:
Chris Smith wrote:
Unfortunately, the meaning of the term "reference" and "pointer" is
language-dependent. Java certainly does not have references in the C++
sense. All Java identifiers are used to designate distinct variables;
you never have two different variable names that both mean the same
thing.
Really?


Yes, really. I think perhaps you are misunderstandin g the definition of
references in C++, actually. In C++, the declaration of a reference
does not create any kinds of new "thing" at all. It just creates a new
name, perhaps in a different scope from the original name, which means
exactly the same thing as the old name did.

Java has no such similar concept. Every time I write a declaration, a
new variable exists separately and independently of any other variable
in the application. Those variables may be "references " (by which
should be understood the C++ concept of a "pointer"), but two references
that are separately declared are separate and distinguishable from each
other, even if they point to the same object.

Don't let yourself get confused by thinking about what the compiler
might do. We're talking about languages here, not compilers. The
compiler is, of course, free to generate code to reserve memory in
response to a C++ reference declaration. For that matter, the compiler
is free to generate code to reserve memory in response to any source
code comment containing the word "orange". The language only specifies
the behavior, not how the compiler achieves that behavior.
Are you saying all of those a's are different in java? It has been
quite a while since I last used it but it seems to me that they are all
the same instance.


No, 'a' is not an instance of anything. No identifier can ever
designate an instance of anything. It can only designate a variable,
and a variable can only be a primitive or a reference. All of the a's
are different, even if they point to the same thing.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
May 5 '06 #412
"Noah Roberts" <ro**********@g mail.com> wrote in
news:11******** **************@ e56g2000cwe.goo glegroups.com:

class Y
{
A & a;
public:
Y(A & in) : a (in) {}
};

class Z
{
...same as Y
}

...
A a;
A a2;
Y y(a);
Z z(a);

a = a2;

a, Y::a, and Z::a now share the same data.

Java references are pointers without the benifits of being pointers and
without an explicit notation to label them as such to reduce confusion.


Since all references to Java Objects(not primatives sadly) are done the
same way, what reason is there for an explicit notation? Java programmers
know how they work. And they only work one way. That may be a limitation
but it hardly fosters confusion.

Yes, C++ references have many uses. Particularly 'const' ones. But they
also provide sources of confusion.
{
int i=10;
foo(i);
}

is i=10 still? C code yes, C++ maybe. In Java, there is no queston.

But are you are actually saying that having code like a=a2; silently
modify two other objects, z and y, is a reduction in confusion? Got to
love those hidden side effects!

OB
May 5 '06 #413
REH

"WillemF" <jw*********@zo ology.up.ac.za> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. .
Most of the messages in this thread appear to be written by people who
only know one programming language.


Let's see, from the start...

BASIC (TRS-80, APPLE)
Machine (Z80)
Assembly (Z80)
Pascal (standard and USCD)
Fortran (IV and 77)
PILOT and LOGO (but they probably don't count!)
Lisp (good stuff!)
APL (some)
C
COBOL
RPG II
Modula-2
Prolog (very little)
Forth (a little)
Assembly (VAX)
C++
Assembly (8088, x86)
Visual BASIC (shutter)
Ada (83 & 95)
JOVIAL (a little)
Assembly (PPC)
Java
Perl

The order is blurry, and I've forgotten a lot over the years!

Then there are a spattering of things like SED, AWK, SQL, HTML, INFORM,
TADS, 4th gen. languages, etc.

REH
May 5 '06 #414

Otis Bricker wrote:
Since all references to Java Objects(not primatives sadly) are done the
same way, what reason is there for an explicit notation?
You just mention a difference right there in that sentance. In C++
primatives and objects act the same wrt value, pointer, and reference
semantics.

Java programmers know how they work. And they only work one way.
They may behave the same but there is no explicit distinction between
when they are there and when they are not...it is implicitly based on
type.

That may be a limitation but it hardly fosters confusion.
Might not be if it was true.

Yes, C++ references have many uses. Particularly 'const' ones. But they
also provide sources of confusion.
{
int i=10;
foo(i);
}

is i=10 still? C code yes, C++ maybe. In Java, there is no queston.
Sure there is, if i is an object and not a primative. Did Java change
i or not?

I don't know ... is there a way to implement the following signature in
Java? AFAIK there is not:

void foo(const I & i);

That function accepts a reference to an I object that cannot be changed
by foo without purposfully breaking the language's protections through
a const_cast. Callers can rely on the fact that i is not changed as
that definition is a statement to that effect.

I think the closest you could come to that behavior is to create an
"unmutable" interface for I objects and accept that interface instead
of I and then implement it for I. Of course this has to be done for
every different type of object you want to do this with...C++ contains
this interface within the class definition through the form of const
operations...a simple keyword that you place on functions that do not
alter the internals of the object...and the language won't let you do
it either unless you explicitly ask it to through casts or the mutable
keyword.

You can only do that if you have control over the I object and can
cause it to 'implement' an interface. Since your language doesn't
provide the idea of const as part of the language it isn't standard to
find interfaces implemented in those terms...in C++ it is. Either way
you have good vs. bad code and in the end can get the same thing done,
but C++ offers a little better way of doing it.

And off course interfaces are just a piss poor replacement for multiple
inheritance ;)

Also,

void foo(I i);

Is I changed? Certainly not in C++ where i is passed by _value_ no
matter what type it is...in Java you can't tell...someone may have
called a mutable function on it. In Java if i is an int it is copied
and the original is not changed...but if i is an object then maybe it
is, and maybe it isn't...you can't know from the signature alone.
But are you are actually saying that having code like a=a2; silently
modify two other objects, z and y, is a reduction in confusion? Got to
love those hidden side effects!


It is certainly not hidden and that was a sample only.

May 5 '06 #415
"Noah Roberts" <ro**********@g mail.com> wrote in
news:11******** **************@ i40g2000cwc.goo glegroups.com:

Otis Bricker wrote:
Since all references to Java Objects(not primatives sadly) are done
the same way, what reason is there for an explicit notation?
You just mention a difference right there in that sentance. In C++
primatives and objects act the same wrt value, pointer, and reference
semantics.


Actually they are very consistant. It is ALWAYS pass by value. It is
just that variables that hold Objects are always 'references'. Yuo you
are passing the value of the reference.

I said it was consistant. Not obvious.
Java programmers
know how they work. And they only work one way.
They may behave the same but there is no explicit distinction between
when they are there and when they are not...it is implicitly based on
type.


And this is fully understood by any good Java programmer.
That may be a limitation
but it hardly fosters confusion.


Might not be if it was true.


I don't know any halfway good java programmer that it confuses. I
couldprobaly find some butthen I could probaly find C++ programmers that
have trouble understanding references or const.

Yes, C++ references have many uses. Particularly 'const' ones. But
they also provide sources of confusion.
{
int i=10;
foo(i);
}

is i=10 still? C code yes, C++ maybe. In Java, there is no queston.


Sure there is, if i is an object and not a primative. Did Java change
i or not?


As all calls are by value, it cannot change i.
Had the code been
{
A a= new A();
foo(a);
}

a would also have not changed. It would still reference the same object.
But the actual object refered to by a might have changed.

I don't know ... is there a way to implement the following signature
in Java? AFAIK there is not:

void foo(const I & i);

I think you are right and I sometimes wish it were possible. And that
'i' was truly const.

But you seem to have missed my point. The calling code does not provide a
clue about the calling method. If someone changed the declaration of foo
(int i) to foo(int& i), my code is affected and my assumptions are no
longer valid. In Java, I KNOW that foo(a) might modify the object
referenced by 'a' if its an object but the reference will still point to
the same object. And that foo(int i) will not change anything.
That function accepts a reference to an I object that cannot be
changed by foo without purposfully breaking the language's protections
through a const_cast. Callers can rely on the fact that i is not
changed as that definition is a statement to that effect.

As I am primarily a C++ developer and have worked with the language for
close to 15 years, I am aware of those facts. But thank you. Some of the
Java folks may not know about it. Though you should see below since your
statement is a little too broad. Even ignoring 'mutable'. And I do like
and use 'mutable' to allow for logical rather than physical constness.
I think the closest you could come to that behavior is to create an
"unmutable" interface for I objects and accept that interface instead
of I and then implement it for I. Of course this has to be done for
every different type of object you want to do this with...C++ contains
this interface within the class definition through the form of const
operations...a simple keyword that you place on functions that do not
alter the internals of the object...and the language won't let you do
it either unless you explicitly ask it to through casts or the mutable
keyword.

You can only do that if you have control over the I object and can
cause it to 'implement' an interface. Since your language doesn't
provide the idea of const as part of the language it isn't standard to
find interfaces implemented in those terms...in C++ it is. Either way
you have good vs. bad code and in the end can get the same thing done,
but C++ offers a little better way of doing it.

Not sure why it has become my language. But thanks for the gift. Can I
collect royalties?

And const is not quite as const as you imply. Forgive the lack of
using/includes

class TestCase{
char*a;
public:
TestCase(){
a=new char('b');
}
~TestCase(){
delete a;
}
void dump(){
cout<<*a<<endl;
}
void morph()const{
*a='a';
}
};

void foo(const TestCase& t){
t.morph();
}

Const applies only to directly held objects. If you need to dynamically
allocate items, there are open to modification. As are non-const
references. So I cannot make TestCase::a point somepace else in morph or
foo but I can change the value that it points to.

And off course interfaces are just a piss poor replacement for
multiple inheritance ;)

MI is nice sometimes. But I often find it misused. Composition often
works better. Personally, I have found that NOT being able to use MI in
Java has often made me think more about composing objects/interfaces and
provided a better solution in the end. The same can and should be done
with C++ and I try. C++ does not prevent this. But I picked up the skill
working in Java as it was forced upon me. Languages shape out thinking.
Also,

void foo(I i);

Is I changed? Certainly not in C++ where i is passed by _value_ no
matter what type it is...in Java you can't tell...someone may have
called a mutable function on it. In Java if i is an int it is copied
and the original is not changed...but if i is an object then maybe it
is, and maybe it isn't...you can't know from the signature alone.


Actually, your example from before shows that i MIGHT change. At least
logically change.

class I{
int & handle;
public:
I(int& x):handle(x){};
void morph()const{
handle++;
}
void dump(){
cout<<handle<<e ndl;
}
};

void foo(I i){
i.morph();
}

I guess you could argue that it was the int& that changes. But clearly,
the state of the original i is not the same before and after that call.

But are you are actually saying that having code like a=a2; silently
modify two other objects, z and y, is a reduction in confusion? Got
to love those hidden side effects!


It is certainly not hidden and that was a sample only.


Well, without looking through the definitions/implementations of Y and
Z, I would wave no way of knowing to expect this behaviour. And having
looked, I would have no way of knowing if that behaviour was changed in
the future. My code would still compile but the behaviour would change.
I call that hidden though you are free to use another term.

And yes, the same sort of bad code could be done in Java.

C++ is very flexible and powerful. I like working with it. But that does
not mean that Java is bad. It is different. As are Smalltalk and
Haskell. We should use them all to learn new ideas and understand the
craft better.
OB

May 5 '06 #416
In comp.lang.java. advocacy, Noah Roberts
<ro**********@g mail.com>
wrote
on 5 May 2006 12:16:20 -0700
<11************ **********@i40g 2000cwc.googleg roups.com>:

Otis Bricker wrote:
Since all references to Java Objects(not primatives sadly) are done the
same way, what reason is there for an explicit notation?
You just mention a difference right there in that sentance. In C++
primatives and objects act the same wrt value, pointer, and reference
semantics.


There are some languages that allow methods on primitives. Java,
sadly, is not one of them. :-) (Neither is C++.)
Java programmers
know how they work. And they only work one way.
They may behave the same but there is no explicit distinction between
when they are there and when they are not...it is implicitly based on
type.
That may be a limitation
but it hardly fosters confusion.


Might not be if it was true.

Yes, C++ references have many uses. Particularly 'const' ones. But they
also provide sources of confusion.
{
int i=10;
foo(i);
}

is i=10 still? C code yes, C++ maybe. In Java, there is no queston.
I believe the newest version of C now allows references. However,
I'd have to look.

Sure there is, if i is an object and not a primative. Did Java change
i or not?
int is not an object. Integer is not mutable and is final.
If one uses something like HashMap, however, all sorts of
silliness can ensue.

I don't know ... is there a way to implement the following signature in
Java? AFAIK there is not:

void foo(const I & i);

That function accepts a reference to an I object that cannot be changed
by foo without purposfully breaking the language's protections through
a const_cast. Callers can rely on the fact that i is not changed as
that definition is a statement to that effect.
There is no elegant method to enforce constness in
an *object*. One can declare a parameter final but all
that does is preclude assignment within the code to that
parameter variable; the object is still mutable.

Hence hacks such as Collections.unm odifiableMap(Ma p).

One can attempt cloning of an object that there are a number of
issues there too, not the least of which is performance.

Also, the following cannot be done in Java, although one can
emulate them to some extent.

A & operator = (A const &);

Assignment operator.

A(A const &);

C++ Copy constructor, guaranteed to be called whenever needed.

~A();

Destructor. One can implement the finalize() method but one
cannot forcibly delete an object without some work -- the best
I can do is a forced garbage collection.

void * operator new(size_t);
void operator delete(void *);

Java has "one size fits all" memory allocation, though internally
one might see various perturbations, depending on the information
available to the compiler. Presumably the JVM has the option of
allocating an object on stack (for objects that never get exported
therefrom), or on the heap. However, I'd have to look.

void * operator new[](size_t);
void operator delete[](void *);

Arrays of objects in Java are little more than arrays of pointers.
In fact,

A a[] = new A[10];

a[5] = null;

is perfectly legal in Java; C++ would generate a compile time error.

I think the closest you could come to that behavior is to create an
"unmutable" interface for I objects and accept that interface instead
of I and then implement it for I.
That is a choice, yes. I'd say that's one of the better methods,
especially if one wants to create a Swing Bean. In that case,
one creates three items:

- the interface containing get/set methods and maybe some constants
- the data bean, which is little more than get/set stuff
- the Swing form, which is also get/set but instead of storing
data it stores into the widgets

A fourth and fifth interface can be optionally added; the fourth
interface would implement only the get() methods, the fifth the set().
The original interface would derive from *both* of them (Java allows
multiple inheritance of interfaces, as there's no "diamond problem").

A seventh object can be added for translation from and to a
recognized format, such as XML or JDBC, or one can split this
particular item into two pieces. Or one can use java.io.Seriali zable
or java.io.Externa lizable.

At some point, one starts to get into overengineering territory. :-)
Of course this has to be done for
every different type of object you want to do this with...C++ contains
this interface within the class definition through the form of const
operations...a simple keyword that you place on functions that do not
alter the internals of the object...and the language won't let you do
it either unless you explicitly ask it to through casts or the mutable
keyword.
Const can turn into a bit of a mess (mostly because if one
changes a parameter from (A &) to (A const &) in a routine
declaration, implementations tend to propagate the change
down) but at least it's allowed, and in fact in two places,
in C++:

A * p; // movable pointer to changeable value
A * const p; // fixed pointer to changeable value
const A * p; // movable pointer to unchangeable value
const A * const p; // fixed pointer to unchangeable value

Casting such as (A *) p is also possible but frowned upon;
one can also do const_cast<A *>(p), which is a little
easier to search for. The syntax can get a little ugly;
in fact, there's a utility for translating English-like
declarations to the C soup of (), [], and *.

In Java, one has four bad choices, if one is using a Map
or Set (for other classes, only the first is known to
be available; the second should work for Cloneable objects,
which fortunately includes HashMap and TreeMap -- beware,
however, as clone() is *protected*):

Map p = ...;

final Map q = p; // q cannot be assigned to but all
// methods such as q.put("a","b") are legal

final Map q = (Map) q.clone(); // q is a duplicate of p

final Map q = new TreeMap(p); // q is a duplicate of p,
// and not all classes support this sort of constructor

final Map q = Collections.unm odifiableMap(p) ; // q cannot
// be assigned to and q.put("a","b") throws an
// UnsupportedOper ationException at runtime.

You can only do that if you have control over the I object and can
cause it to 'implement' an interface. Since your language doesn't
provide the idea of const as part of the language it isn't standard to
find interfaces implemented in those terms...in C++ it is. Either way
you have good vs. bad code and in the end can get the same thing done,
but C++ offers a little better way of doing it.

And off course interfaces are just a piss poor replacement for multiple
inheritance ;)
I don't particularly care for multiple inheritance, mostly because
of the "diamond problem". However, it can be useful, when
carefully managed. I prefer Java's solution here.

Also,

void foo(I i);

Is I changed? Certainly not in C++ where i is passed by _value_ no
matter what type it is...in Java you can't tell...someone may have
called a mutable function on it. In Java if i is an int it is copied
and the original is not changed...but if i is an object then maybe it
is, and maybe it isn't...you can't know from the signature alone.


Actually, one can, if the signature includes parameter types. Java's
blot, of course, is that int != Integer; the former is passed by value,
the latter by reference. (Of course for int and Integer it's a poor
example, since no one can modify an Integer anyway. However, other
classes, such as HashMap, are easily modified.)

But are you are actually saying that having code like a=a2; silently
modify two other objects, z and y, is a reduction in confusion? Got to
love those hidden side effects!


It is certainly not hidden and that was a sample only.


The side effects problem is prevalent in both languages.

--
#191, ew****@earthlin k.net
Windows Vista. Because it's time to refresh your hardware. Trust us.
May 5 '06 #417

Otis Bricker wrote:
And this is fully understood by any good Java programmer.
Stupid argument. Any X language developer is aware of the quirks and
limitations of the language they use.

As all calls are by value, it cannot change i.
Had the code been
{
A a= new A();
foo(a);
}

a would also have not changed. It would still reference the same object.
But the actual object refered to by a might have changed.


You are purposfully skewing the discussion to match the point you are
trying to make...which is a pointless point anyway. The object the
variable a refers to changes if any mutable operations are performed on
it....you cannot stop it from happening or label if it will or not.
Stop playing with definitions and argue intelligently.

Point taken on the rest...

May 5 '06 #418

The Ghost In The Machine wrote:
Const can turn into a bit of a mess (mostly because if one
changes a parameter from (A &) to (A const &) in a routine
declaration, implementations tend to propagate the change
down) but at least it's allowed,...


True, but such conditions indicate one of two things:

1) The object you are trying to make const should not be const because
you do in fact modify it in the code.

or

2) The functions you are calling in the code should have been const to
begin with.

In the case of 1 it is obvious that you are in error and the language
is telling you so...still, it will let you do it by using some casts to
get rid of constness and ignore the advice of the compiler.

In the case of 2 you are really just fixing bugs by propegating the
const chain.

This is a daily thing for me in certain legacy code I work on
actually...it was implemented poorly...I'm fixing it by adding const
where it belongs when I need to.

May 5 '06 #419
In comp.lang.c++ Noah Roberts <ro**********@g mail.com> wrote:
void foo(const I & i);

That function accepts a reference to an I object that cannot be changed
by foo without purposfully breaking the language's protections through
a const_cast. Callers can rely on the fact that i is not changed as
that definition is a statement to that effect.


Translation: The const "guarantee" can trivially be broken by casting
away const; thus, it's no real guarantee at all.
May 5 '06 #420

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6821
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what the issue is. Thanks Ravi
1
6923
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
11
9294
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
0
5662
by: mailkhurana | last post by:
Hii , I am trying to use a type 2 driver to connect to DB2 0n AIX 5 I have a small java test to class to establish a conneciton with the db .. I am NOT using WAS or any appserver When I try to connect to the DB I get the following exception at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2120)
1
9668
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
12
5935
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it says: usage: java fit.FitServer host port socketTicket -v verbose I think this is because I do not understand the jython mechanism for inheritance (yet).
0
3292
by: jaywak | last post by:
Just tried running some code on Linux (2.4.21-32.0.1.EL and Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)) and Windows XPSP2 (with Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)) and in both cases, get the following list returned from calling getDeclaredFields() on java.lang.ClassLoader via this code snippet: Field fields = loaderClass.getDeclaredFields(); for (int i = 0; i <...
1
4310
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in Linux there is an error. The code that fails is the following: SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); I´m sure that code is ok. In fact, I´ve found that in several...
0
3301
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
0
9867
marktang
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...
0
9709
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,...
0
10939
Oralloy
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...
1
10669
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,...
0
10308
tracyyun
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...
1
7853
isladogs
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...
0
7028
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();...
0
5695
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...
0
5882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.