Anonymous
ahh
Anonymous
because sol size need to start with 0
Anonymous
Anonymous
ahh
look at the call stack. this function will return to "algorithm" i.e. the same function
Anonymous
i.e. it will return to line 54
Anonymous
but there is no assignment there
Anonymous
Anonymous
you tell me in the ligne 54 I need to save the return?
Anonymous
But I don't have nothing to save
Anonymous
sol_size it is not increasing outside but when (current_sum == sol_number) I return the value
Anonymous
Anonymous
returning to algorithm
Anonymous
not to runner
Anonymous
i told you to look at the call stack
Anonymous
Anonymous
That is what I need, only return to runner when get solution or not exist solution
Anonymous
Anonymous
yes, it is a recursive algorithm
Anonymous
Anonymous
and you are returning the new sol_size to algorithm()
Anonymous
runner is still getting 0
Anonymous
because you are discarding it
Anonymous
ahh
Anonymous
now I get it ...
labyrinth
anyone familiar with c++implementation of trie?
Anonymous
now I get it ...
yes. you need to do something with the value returned at line 54
Anonymous
Anonymous
thank you bro, I will work in this
Anonymous
https://pastebin.com/Js0mqzzR
Anonymous
Fixed! Thank you very much, you are great 😊🙏🏻
labyrinth
i have seen some problems based on trie on leetcode written in c++, but it seems that most of what i have seen have memory leak, is there any elegant way to prevent this from happening (destructing it)?
piggyho
smart pointers. or fix leaks
run in valgrind with heap check to verify
piggyho
GitHub and gitlab have some code you can look at for trie.
PO
guys
PO
I need your help
PO
Someone can make me sure if I'm right or not, please?
I have a 2 dimension array and I would like to substitute each value substitute 255.
for(i = 0; i < raw; i++){
for(j = 0; j < column; j++){
fprintf(std, "%d", 2darray[i-255][j-255]);
}
}
PO
piggyho
not sure what ur asking
PO
piggyho
don't understand what your question is @PO_uria
Alex
Anonymous
PO
PO
0 0 0 0 10
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
1 0 0 0 1 0
0 1 1 1 0 0
0 0 0 0 0 0
0 0 0 0 0 0
PO
Alex
Alex
PO
Anonymous
Hiiii
Patrick
Hello, is there a lightweight construct somewhere in standard C++ which is like this:
auto box = Box<int*>(new int());
//...
return true; //the int is deleted
Just something to store pointers in so I don't have to call delete myself, or write my own tiny class if one's already available
olli
Anonymous
sorry, In here, Who develop Qt with frame work PyQt?
Dinesh Kumar
Ohk
Pavel
Do some of you guys work with RTTI or exceptions disabled? Does it work fine with 3rd party libraries? How big percentage of well known libraries in your experience doesn't support working without one or another?
Anonymous
Hey guys i need some solutions of sorting
Anonymous
How to sort array and string
Anonymous
Solve it
Anunay
Google it, let us know if you don't understand something specific
Anonymous
Anonymous
But i can't do that ...so here anyone clear that logic
nelnel
Hi
nelnel
I want to seek some advice
nelnel
I am a C++ programmer for 18 years
nelnel
My knowledge is still in C++98 stage
nelnel
I am now 4x years old
nelnel
I feel a little bit depressed by family matter
nelnel
Anyone can shed me some new light
Alex
there are lots of videos on youtube about c++98 c++11 etc difference
nelnel
Do u know if there is any certification course for c++ that I can start rebuilding my confidence?
Pavel
What can be a reason for a static function not being found from template function like this
template<typename T>
StringID GetComponentClassName()
{
return (T::GetClassName());
}
It says that "'GetClassName': is not a member of 'ImguiComponent'" but this is not true because this function is presented in that class declared like this
static StringID GetClassName() { return STR_TO_ID("ImguiComponent"); }
Pavel
Anonymous
I want to ask something
Alex
what container type is the fastest for:
1. getting min element
2. remove elements by criteria
3. inserting new elements. number of new elements is less than removed. so size of container is decreasing
currently unsorted vector is used. Looking for priority queue, but there is no "remove elements by criteria" operation
Anonymous
inorder to create website you must have to know what languages?