0_0_26138353_23851.cpp: In function 'int sap()': 0_0_26138353_23851.cpp:43:17: error: 'flag' was not declared in this scope flag=1; ^