Top "Assignment-operator" questions

The operator used when one object is assigned to another

What is the copy-and-swap idiom?

What is this idiom and when should it be used? Which problems does it solve? Does the idiom change when …

c++ copy-constructor assignment-operator c++-faq copy-and-swap
Why don't Java's +=, -=, *=, /= compound assignment operators require casting?

Until today, I thought that for example: i += j; Was just a shortcut for: i = i + j; But if we …

java casting operators variable-assignment assignment-operator
What is The Rule of Three?

What does copying an object mean? What are the copy constructor and the copy assignment operator? When do I need …

c++ copy-constructor assignment-operator c++-faq rule-of-three
What are the differences between "=" and "<-" assignment operators in R?

What are the differences between the assignment operators = and <- in R? I know that operators are slightly different, …

r assignment-operator r-faq
What's the difference between `=` and `<-` in R?

I'm using R 2.8.1 and it is possible to use both = and <- as variable assignment operators. What's the difference …

r assignment-operator variable-assignment
How to compare a char?

I am learning c. I have a question. Why doesn't my program work? #include<stdio.h> #include<…

c char conditional-statements assignment-operator
Array type char[] is not assignable

Well here is my first post. I've been trying to do this choice choosing thing and I want the user …

c arrays string assignment-operator
How to use base class's constructors and assignment operator in C++?

I have a class B with a set of constructors and an assignment operator. Here it is: class B { public: …

c++ inheritance constructor assignment-operator
how to use if else in xquery assignment

I am trying to use a if condition to assign a value to a variable in an xquery. I am …

xquery if-statement assignment-operator
The copy constructor and assignment operator

If I override operator= will the copy constructor automatically use the new operator? Similarly, if I define a copy constructor, …

c++ constructor operators copy-constructor assignment-operator