python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Difference in function declaration within objects JavaScript
What's the difference in declaring functions like this in JavaScript
const sub = {
_unsubscribed: false,
unsubscribe() {
this._unsubscribed = true
},
next(value) {
if (this._unsubscrib...
djoo
Votes: 0
Answers: 0
Default parameter in a function wouldnt compile/link without static inline
i was writing a BST class in C++ and wanted to add a default parameter to a function but, when i tried to the visual studio compiler gave compile and linking errors, so after a bit of googling, i made...
Programvarg
Votes: 0
Answers: 2
Why does an invalid use of C function compile fine without any warnings?
I'm more like C++ than C, but this simple example of code is big surprise for me:
int foo() {
return 3;
}
int main() {
int x;
foo(&x);
return x;
}
https://godbolt.org/z/4ov9nTzjM...
Marek R
Votes: 0
Answers: 4
How does compiler deduce return type from this lambda expression?
I am creating a web-socket server in C++ with Boost library. My starting point was a Boost example from this site.
I have a question with this part of code in the on_run method:
ws_.set_option(websoc...

Fox1942
Votes: 0
Answers: 2