Ignore a block of code that fails c++ -


is there way ignore block of code if fails execute in c++? try - except in python, me lot.

i'm trying make program reads information of file contains number, , converts integer stoi(). problem file being modified program, , @ point main program may read file when being modified, giving emty string , making program fail when trying convert integer.

what make program ignore loop if stoi() fails, , wait until loop executed again actualized information. know can done in python try , eccept, don't know how in c++.

try block associates 1 or more exception handlers (catch-clauses) compound statement.

for more detail please refer try catch in c++


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -