#include <iostream>
#include<string>

using namespace std;

int main()
{
	string str1="Amusement Park";
	string str2="going to";
	string str3="the";
	string str;

	cout<<str2+''+str3+''+str1<<endl;
	cout<<str1.length()<<endl;
	cout<<str1.find('p')<<endl;
	cout<<str1.subtr(1,5)<<endl;
	str="ABCDEFGHIJK";
	cout<<str<<endl;
	cout<<str<<endl;
	cout<<str.length()<<endl;

	str[0]='a';
	str[2]='d';

	cout<<str<<endl;

 	return 0;
}

This

cout<<str2+''+str3+''+str1<<endl;

should be this

cout<<str2+' '+str3+' '+str1<<endl;

And this

cout<<str1.subtr(1,5)<<endl;

Should be this

cout<<str1.substr(1,5)<<endl;

1. string is not defined as a variable in C++. Use char* or char[50] instead.
2. str="ABCDEFGHIJK"; is erroneous. Use strcpy() or the like instead.

Thanks...

1. Next time use code tag with the language specifier:
[code=cplusplus] source

[/code]
2. Double apostrophes (empty character constant) is not a valid construct in C++ (have you ever seen the compiler diagnostic messages? ):

cout<<str2+''+str3+''+str1<<endl;

Use ' ' for the space character.

1. string is not defined as a variable in C++. Use char* or char[50] instead.
2. str="ABCDEFGHIJK"; is erroneous. Use strcpy() or the like instead.

Thanks...

??? What's a nonsense?

This question has already been answered. Start a new discussion instead.