PIYUSH AND MAGICAL PARK

#include
using namespace std;

int main()
{
char ch;
int m,n;
cout<<“Enter the Rows and Column\n”;
cin>>m>>n;
int k,str,flag=1;
cout<<“ENTer the k and the strength\n”;
cin>>k>>str;

char arr[10][10];

cout<<"enter the array elements\n";

for(int i=0;i<m;i++)
{
	for(int j=0;j<n;j++)
	{
		cin>>arr[i][j];
	}
}

for(int i=0;i<m;i++)
{
	for(int j=0;j<n;j++)
	{
			ch=arr[i][j];
			if(j!=0)
			{
				str-=1;
			}
			if(ch==".")
			{
				str-=2;
			} 
			else if(ch=="*")
			{
				str+=5;
			}
			else if(ch=="#")
			{
				break;	
			}
		if(str<k){
			flag=0;
			break;
		}
	}
	if(flag==0)
	{
		cout<<"not possible to escape from the park\n";
		break;

	}
}

cout<<"\n"<<str;
return 0;

}

it is showing error “error: ISO C++ forbids comparison between pointer and integer [-fpermissive]”
please check once?

image
since data type of ch is character
hence u need to compare it with single character ‘.’ and not string “.”

image these lines are not to be written
else code will not get submitted

Ohk , thanks. . . .

I know my code is not complete but why my showing segmentation fault