prog.cpp: In function ‘int main()’:
prog.cpp:8:18: error: ‘A’ was not declared in this scope
for( int i=0; i<A.length(); i++ )
^
prog.cpp:10:13: error: ‘p’ was not declared in this scope
if( A[0]!=p[0] )
^
prog.cpp:14:22: error: ‘flag’ was not declared in this scope
if( A[i]==p[j] && flag ==0 )
^~~~
prog.cpp:28:8: error: ‘flag’ was not declared in this scope
if( flag == 1 )
^~~~
prog.cpp:35:8: error: ‘flag’ was not declared in this scope
if( flag ==0 && A[i]!=p[j] )
^~~~
prog.cpp:39:9: error: ‘p’ was not declared in this scope
if( j!=p.length())
^