#include #include //to use the string class functions using namespace std; int main() { //We declare strings by using "string" as a data type and declaring a variable //strings can be initalized with quoted string literals string cat ="meow"; string fruit ="apple"; //To print a string, we can just use cout cout<>cat; /*Comparing strings can be done with realtional operators or using *the compare function. *The results will be in lexicographic order, where uppercase letters occure before lowercase letters.*/ if(cat == fruit) cout<<"They are the same"<>x; cout<<"Enter a length: "; cin>>l; cout<<"The substring is "<>newstring; fruit.insert(x, newstring); cout<<"Fruit is now "<>newstring; if(fruit.find(newstring,0)>0) cout<<"Found the substring"<