python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Contradicting definition of implicit this parameter in the standard
I am learning about classes in C++. I came across the following statement from the standard:
During overload resolution, non-static cv-qualified member function of class X is treated as a function th...
Jason
Votes: 0
Answers: 1
linked list c++ difference between void function and return this
I have a question about the differences between 2 styles of coding:
void *addfirst (int data){
head = new Node(int data, head);
return;
}
and the second is:
LinkedList *addfirst (int data){...
dubidu
Votes: 0
Answers: 1
Why `a` can be printed from `baz`?
const Foo = function(a){
// bar doesn't belong to any instance
function bar(){
console.log(a);
};
this.baz = function(){
console.log(a);
}
}
const f = new Foo(7);
f.baz() // print...
Edward Sun
Votes: 0
Answers: 0
setter method giving an error due to this keyword
The program is throwing an error in the setter method possibly due to the use of this keyword. Why is it giving an error?
The error: Method call setAge(-5), set a field value of "-5" but &qu...
Shephali Shukla
Votes: 0
Answers: 1