Anonymous
template<class....>
So? I don't know why you call it this way, but it's wrong term
Anonymous
in my class it is intended, so you can reconstruct it at any time
It's more preferable,you overload new and delete operator themselves
Anonymous
template<class....>
It's a variadic template and nothing tricky about this so far
Anonymous
So? I don't know why you call it this way, but it's wrong term
It's more cleaner, when one use std::tuple what do you think
Anonymous
No, it's not
I think it does
Anonymous
It's more cleaner, when one use std::tuple what do you think
I don't think you know what you're talking about
Anonymous
Hmmmm ok
https://t.me/programminginc/361644 This message doesn't make any sense
Anonymous
hmm, how would I fix this the right way?
Google for perfect forwarding
Avinash
#vscodesetup101
Anonymous
Does anyone know how to fix exc_bad_access?
Anyone can help to fix this error?
olli
How will copy assignment work in this class?
e.g. AutoPtr<int> X { 3 }; std::cout << *X; *X = 123; std::cout << *X;
Igor🇺🇦
e.g. AutoPtr<int> X { 3 }; std::cout << *X; *X = 123; std::cout << *X;
I mean, what will happen when we have X = Y and both are AutoPtr?
olli
I mean, what will happen when we have X = Y and both are AutoPtr?
the assignment is 'fine' - as just mentioned, there will be a double free which is UB and will most likely crash
Igor🇺🇦
the assignment is 'fine' - as just mentioned, there will be a double free which is UB and will most likely crash
Assignment is kinda the reason for double free. That's why unique_ptr has it deleted and uses move only
Anonymous
What happens when T doesn't have default constructor?
There will be a compiler error when a user will try to call reset
Igor🇺🇦
There will be a compiler error when a user will try to call reset
Yes, and that makes many classes unusable with this implementation. unique_ptr doesn't have this limitation
Ange
Hi is anyone doing iq option
Ange
Anonymous
Hi is anyone doing iq option
/warn meta & offtop
Bruno
/info
Salvo
Salve
Bruno
/rules
Bruno
Salve
Please, read the rules.
Anonymous
/info
Carlos
hi there
Carlos
does any here have any experience with UPX compressor?
Anonymous
Is there any method to iterate a number or integer for ex if i want to iterate through 45397 to check every digit as odd or even how to do this??
Anonymous
thanks sir
umm should i add the odd or even checking part in the loop itself or outside the loop??
JoyfulTyrant
#include <iostream> using namespace std; int main() { int a = 10; int *p = &a; int **q = &p; int b = 20; *q = &b; (*p)++; cout<<a<<" "<<b<<endl; return 0; }
Alex
Can someone explain how the output is '10 21' and not '11 20'
*q = &b. p is pointed to b now. so (*p)++ b is incremented, not a
JoyfulTyrant
Cool, thanks 🙌
HaiNahi
Making a chess engine any one help me or join the project?
Kehinde Joyce
Hello
Kehinde Joyce
I'm new here
HaiNahi
Yeah
Aaditya
Hi I am new here
Aaditya
Can anyone teach me c language
writer
Is everyone here a student?
ken
Hello guys. Please does anyone have an idea how to write to a file with in a column form. The problem is that it's a loop and contents change after every iteration so I can't write to it with something like this "file << first iteration << second iteration << ..." And again the loop iteration is dynamic so I can't do a row major calculations to print it too. Any help?
ken
I have a vector of arrays. Each array should represents a column. I add to the vector based on the users input. So if the user has for instance 3 arrays pushed into the vector that means each array should be one column. The iteration is fine but writes everything in just one column.
Anonymous
/ban Angie
SURIA
/info
rajma
/info
Anonymous
/info
Anonymous
/info
Ishank
/info
Anonymous
So what's the problem
A N
/notes
Futuristic Programmer
/get goodcodingmrntality
Ishank
#include <stdio.h> int main () int a=2,b=4; printf ("the value of a is %d\n",a++); printf ("the value of a is %d\n",a++); printf ("the value of b is %d\n"b——); return 0; }
MᏫᎻᎯᎷᎷᎬᎠ
Where is the error?
I think you forgot to put a comma in your last printf statement
Anonymous
After int main
Ishank
After int main
Thanks , now it's running
Raz
/notes
Anonymous
/rose_as_my_girlfriend
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
NAOL
/rose_as_my_girlfriend
Amir Hossein
/rose_as_my_girlfriend
Anonymous
@neko_code look at this