I have the Bitcoin source code (multithreaded) and I'm intending to add some new lines. On Bitcoin network data messages are exchanged where data are stored in vectors. I want to implement some instrunction whenever a vector increases in size:
How can I code following pattern in C++ in order to execute statements inside if:
if ("vVector.size() did not increase")
//*instruction*
?
NOTE: vVector is incremented automatically from time to time. It's actually a clone of another vector that collects things and expands without me having and willing to have control on it.
EDIT:
When I do:
if (!(vVector.size()++))
//do whatever is here
I get following error: lvalue required as increment operand
vVector is filled inside another function of the same cpp-file by a function that is declared in a separate header file.
here's a code snippet with a short description: http://hastebin.com/amisuvafab.coffee