Getting an error

sir i attempted for an online exam and it had a question:
we were given a vector of sentences and a vector of queries…for each query , we needed to find the words present in the query in the sentences and print the sentence number in which all the words of the query was present
eg
sentences are:
sentence[0]= tom likes alice
sentence[1]=alice and tom are students
sentence[2]=tom likes to ski
sentence[3]=alice has a dog

and queries are:
query[0]=tom alice
query[1]=dog

the output would be:
0 1
3

i am getting an error: https://ide.codingblocks.com/#/s/20427