Message from C, C++ talks

June 2019

— Ah, shi.. yes, incrementing one with that condition was a stupid inea.

Then.. we can create a new bool flag, representing whether the last processed item was good or going to be deleted. Set it to true, when we in p[i] > pre block and set it to false in the else block of this if.
And in the beginning of the block where we setting it to false do

if (isValueWasBad) count++;


So we will still increment the value in case we shold have one as the answer.

Message permanent page

— Remove value from vector is too inefficient. try to build a new vector only from required values. without removing elements by one

Message permanent page

— So what’s your problem

— Suggest best IDE for C++

— 

If you about what I wrote, I used "removing" to refer to part of the original alghoritm, that is being analyzed. So no removement is needed now. You can find the task and some code examples above, if you're interested.

— What OS do you use?

— Vim

— I use ubuntu 18.04

— No vim is not an IDE but an editor

— You can install plugins to make it more like an IDE

— Why do you say its best?

— Visual studio code or qt creator or clion. if you want gui

— Well, there are lot of choices. I would suggest to try QtCreator, especially if you have not very powerful PC. But actually if I were you, I would open some list of "best c++ IDE" from the internet and try them all, to see which you like the most.

Message permanent page

— Thanks for kind suggestion!!!

— Lol I think we should make a rule, if someone offers vim as an ide to use you’ll get instant ban.