Anonymous
Ot doesnt cause any restrict, warn is not one
after 2 warnings a person get banned from communicating with 8846
Anonymous
these is rough for the people who were banned for small matters
Anonymous
to you not to them
Artöm
I agree tho that warn amount should be lifted to 3
Anonymous
and them is more than u
Artöm
to you not to them
If it doesnt matter for them, they arent welcome here
Anonymous
I agree tho that warn amount should be lifted to 3
u still didn't understand the princible here
Artöm
u still didn't understand the princible here
People get warns according to rules. They have plenty of time to read them and not be stupid
Anonymous
the rules doesn't make any sense
Anonymous
the rules doesn't make any sense
go to offtop chat and reason your point
Anonymous
go to offtop chat and reason your point
thx but i never saw something like these since i used telegram
Artöm
Anonymous
Which part for example?
these converstion is over
Mr_X
Anyone tell me the logic for 1 1 2 2 4 2 6
Mr_X
For odd position num%2 ==0 then print num+2 For even position what logic can I use ?
Anonymous
Hii
Dima
Dima
Anonymous
Maybe
Mr_X
.
1 1 2 2 4 2 6 3 8 3 10 3 12
Anonymous
What is this: void foo() { new std::vector<int>{}; }
Dima
lol
Anonymous
trash with memory leak
A bit elaborated will help
Pavel
A bit elaborated will help
You create an empty vector of ints that just got lost.
Pavel
So that's a memory leak
Anonymous
1 1 2 2 4 2 6 3 8 3 10 3 12
Well what you mentioned for even positions doesn't go with this one
Anonymous
There are two patterns
Anonymous
2 4 6 8 10 12,...
Anonymous
And 1 22 333
Ioann_
i don'k know why not
Ioann_
cause my publication is very usefull for C++ community
Ioann_
it's bad? Why?
Dima
he just got triggered to non-english I think
Pavel
Rules are rules for everyone
Anonymous
std::vector<int>{}; ? initialises vector with what?
Dima
at least it is on-topic
klimi
he just got triggered to non-english I think
> non English > YouTube link
Dima
> non English > YouTube link
I thought you are a sweetie girl
I_Interface
std::vector<int>{}; ? initialises vector with what?
just calling constructor with std::initializer_list
klimi
Ioann_
ohm an
if i rewrite my post by Eng, but with URL on russian IT resource is it ok?
Anonymous
just calling constructor with std::initializer_list
Is there any reason to call constructor or wirte it like that?
Dima
👌
Pavel
Is there any reason to call constructor or wirte it like that?
It depends what you're trying to achieve, at the moment your code you've posted does nothing except for creating a leak
Anonymous
So, new std::vector<int>; works?
I_Interface
So, new std::vector<int>; works?
auto vec_ptr = new std::vector<int>; if u want so, but why ?
Pavel
So, new std::vector<int>; works?
Yes, but a vector is almost never needs to be created with new
Anonymous
If an object does not have automatic storage it does not, you need to delete it explicitly. The following leaks void foo() { new std::vector<int>{}; }
Anonymous
👆this
Mr_X
Easy bro
Tell me the logic
Anonymous
So, writing : vector<int > *p = new vector<int>; is correct to write?
Mr_X
And 1 22 333
How can I print this
Anonymous
use auto
cAn you write what your are saying?
Anonymous
Anonymous
Space for vector is made in heap. What does new vector<int> does?
Pavel
cAn you write what your are saying?
auto vec_ptr = new std::vector<int>; But that's arguable, some codestyles prohibit using auto in this case
Anonymous
I mean what's the difference between vector<int> v; and vector<int> *v = new vector<int>;