user14745: I am relatively new to C++ and I was wondering if anybody could help me out. I am looking piece of code that will loop until a block is found by a node and then when one is found print a simple output like "Block found". 
Thanks!

user8717: You could simply record the value of bitcoind getblockcount somewhere and see when that changes by calling getblockcount repeatedly.

14745: <p>I am relatively new to C++ and I was wondering if anybody could help me out. I am looking piece of code that will loop until a block is found by a node and then when one is found print a simple output like "Block found". </p>

<p>Thanks!</p>
 8717: <p>You could simply record the value of <code>bitcoind getblockcount</code> somewhere and see when that changes by calling <code>getblockcount</code> repeatedly.</p>
