Anonymous
Any good book for learning pointers?
klimi
https://pastebin.com/AdfRMZDm
klimi
https://pastebin.com/AdfRMZDm
Can anyone tell me what the line 22 of this code is going ? Tried searching for it in google but could not get the answer
klimi
Meme or fr?
what's fr?
Anonymous
Forreal
klimi
i don't understand.. this is no joke tho
Anonymous
Online sources for static and dynamic memory allocation?
Anonymous
Can anyone tell me what the line 22 of this code is going ? Tried searching for it in google but could not get the answer
prev_index =-1 if str[ i ] is not present in earlier processed string else prev_index = where last str[ i ] was found.
Anonymous
https://pastebin.com/AdfRMZDm
I looked and the code does not have correct braces, but what she said should be right after the code is corrected
manas
any study book on C or C++ will do.
Well, most books I've seen provide a basic intro to pointers and that certainly doesn't help when you just can't figure out the segmentation faults 😝
manas
Is this indian?
Indian is not a language..
manas
writing solid code by steve maguire
Great, thanks! I'll check it out
Anonymous
Amean Hindi
No, it's just a pun write=right
klimi
OT
Dima
Nobody cares about your “indian language” go to
Dima
#ot
Anonymous
Can any of the admin point please out how to enable the 'click to prove you're a human' option of @MissRose_bot ? It's for another group.
Anonymous
I found a good book for understand point,named "Computer Systems: A Programmer's Perspective"
Anonymous
So?
So you should learn from that book
Anonymous
nohello.com
Anonymous
Are you trying to do competitive programming?
Anonymous
You don't need to do that, just take inputs one by one
Anonymous
Just have a loop for test cases like while (test--) { ... }
klimi
Welcome
Anonymous
Where are these people coming from?
klimi
Who knows
klimi
Mostly india
Anonymous
The last 3 in the few minutes all seem like Europeans. Maybe someone shared our group
klimi
They bio says bitcoin
Anonymous
Right lol, Indonesians
klimi
Would say just bot
Bojan_Krdemn
Hi! In C# we use lambdas as a inline functions to do something immediately, is there a way to invoke lambda immediately in c++?
I_Interface
Anonymous
template <typename T> class FenwickTree { private: int n; vector<T> bit; } string s; cin >> s; vector<FenwickTree<int>> tree(26, s.length() + 5);
Anonymous
Can anyone decode this for me?
Anonymous
tree is a vector with 26 elements and each of these 26 elements are vector of type int
Anonymous
Then what is s.length() + 5 ?
Anonymous
Ohh, Is that second argument for constructor? I guess so.
Anonymous
The 5 may be because of 5 fixed nodes in the tree, the rest of the nodes depend on the length of the string
Anonymous
The 5 may be because of 5 fixed nodes in the tree, the rest of the nodes depend on the length of the string
That's ok with/without 5 but I mean to ask that is that second argument for the constructor?
Anonymous
Yes
Anonymous
Yes
👍
Anonymous
When we push_back, an object is created whose copy is actually inserted into the vector. Does that happen for primitive datatypes too?
Talula
No
Anonymous
😂
Anonymous
No
so, for primitive datatypes, there is no difference b/w them?
Artöm
Between push_back and what?
Anonymous
Artöm
No difference after optimization for vector
Artöm
Will be different e.g. for map
Talula
Push_back() is for an array... what do you mean datatypes?
Anonymous
No difference after optimization for vector
after opti? what does that mean?
Talula
And I don't understand why people ask silly questions which they could make a small program online and check.
Artöm
after opti? what does that mean?
Optimization. Makes assembly better
Anonymous
Will be different e.g. for map
diff for map? push_back isn't for maps. so why does diff. comes in first place?
Artöm
diff for map? push_back isn't for maps. so why does diff. comes in first place?
push_back exists in lots of std containers, not only vector
Anonymous
And I don't understand why people ask silly questions which they could make a small program online and check.
How should I check if an additional copy of a variable is made or not using a program?
Artöm
Diff was presented because question was about push_back, not vector::push_back
Artöm
Even if it was a wrong assumption, now you know more