Francisco
Thanks Francisco, you're correct. I just tend forget to use references when passing stuff around 😊
There's no problem in using variables as copies, but be careful because there're some types that can't be copied (like unique_ptr)
GOURAV
I told ya
You can dm me
Dima
no
GOURAV
I quit
Dima
ok go
Dani
I guess it's the nice thing about unique_ptr, that it prevents you from copying it.
Dani
btw, do you use auto a lot? Or do you tend to use explicit typing instead?
Francisco
btw, do you use auto a lot? Or do you tend to use explicit typing instead?
I prefer auto if there's no ambiguity or if the type is too long to type. I prefer to type auto rather than std::unique_ptr<Sprite>
Dima
use explicit types for primitive types and auto for everything else
Dima
but be careful
Dani
But if you read someone else's code, and its full of auto, it can get confusing, no?
Dima
indeed, but as I know there are some ides which show an original type
-_-
/warns
Dani
It looks like Qtcreator supports auto keyword inspection of the real type. Mm..
Dani
it's tempting indeed :)
Francisco
Francisco
Anyway, if you use the auto keyword, you're forced to initialize the variable. That would help a lot when reading the code
Dominic
Any books for me I'm a biginner
Anonymous
Any books for me I'm a biginner
Someone's back from the future lol
Nehemiah Aklil
hi
Nehemiah Aklil
can anyone recommend me the best visual studio c++ tutorials
BinaryByter
you make me want to kill chicken
🐰🐾 سمیه
Book says : a long constant too big to fit into an int will be taken as a long. So why we put a sufficed "l" or "L" after long constants like : 123456789L ?
Nehemiah Aklil
Nehemiah Aklil
Mat
Hey!
Dima
lol .substring(0, 3)
Matt
Hey!
Hey
Anonymous
Hello guys... Help me how to utilize the long lifetime variable... ( option explicit)
Gaurav
what should be the output guys?
Anonymous
No idea..
Gaurav
what should be the output guys?
anybody wants to give a try?
Gaurav
come on it's a C++ group..
Talula
What's kotlin
Kotlin is https://kotlinlang.org/
BinaryByter
unless you overloaded copy constr
Aquib
Only if it's move aware
Aquib
Not otherwise
Gaurav
what should be the output guys?
in this, the output is: ctor without any optimization. Is this a correct behaviour given that copy elision is disabled? I believed that ctor and then copy ctor will be called. But I was wrong.
Liam
Move version of constructor and assignment should be marked as noexcept if possible.
Anonymous
aha, this is fun :D
vamsi
I want a c program for array sort and print the sort array elements in alternatively
vamsi
Any one help
Anonymous
WTF
Trust whom?
Liam
In t1.ball = malloc(strlen(t1.ball) + 1);, the dereference operation of t1.ball on the right side of assignment is UB.
Liam
UB means that: compilers can do whatever on codes, and everytime you run your target code can result in different output.
Liam
Consequence: trust neither.
BinaryByter
nighter?
Liam
nighter?
sorry for typo.
S.
neither
S.
233
Liam
😂
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
this portion has been generated by clang for x86
Nomid Íkorni-Sciurus
what does DWORD PTR mean after a NOP?
Nomid Íkorni-Sciurus
I know that it is a size directive but NOP takes no parameters, right?
Kat
It's just noping for a DWORD right?
Shubham
Printf("I am human");
Nomid Íkorni-Sciurus
Kat
Nop is just padding, right? I assume it's just repeating the instruction to fill a whole DWORD
Nomid Íkorni-Sciurus
ok, but I don't see the point of a 32 bit nop
Kat
Just to fill space
Kat
No idea why though
Nomid Íkorni-Sciurus
what about the [rax + 0x0] address?
Kat
I'm not sure, this is a different assembly dialect than I'm used to
Nomid Íkorni-Sciurus
No idea why though
Hm, maybe to match the executable format
Kat
Possibly
Nomid Íkorni-Sciurus
Kat
x86 NASM
Kat
16 bit real mode
Nomid Íkorni-Sciurus
Hm... I can't reproduce it
Kat
Odd
Nomid Íkorni-Sciurus
I'm studying how structs are compiled from C.
Nomid Íkorni-Sciurus
how would you represent a struct in x86 ?
Kat
I'm not entirely sure