Message from C, C++ discussions

January 2020

— Got it


Why I didn't find on the internet the bubble sort algorithm fully optimized like this?

I implemented it but everywhere it's half-optimized, this should be fully optimized isn't it?

— The problem with this optimization is that if we have for example an array long 1000 and the last half [500-999] is already sorted, this algorithm will still check if it's sorted, ye?

instead with mine I put a wall where the last swap has taken place and I check all before that, am I right?

Message permanent page

— Purge complete.

— Guys I need a little help, I have a couple of static libraries that I want to merge into one static library. I have write add_library(name STATIC) and then target_link_libraries(name ....). But new library doesn't created

Message permanent page

— What I am missing?

— ;

— What do you mean?

— What the hell ? Just create a new lib file and move code from other libs into the new.

— Sir

— I don't think that will work for me

— As I understood target_link_libraries doesn't link library immediately into .a file.