#include
#include
#include
using namespace std;
int main()
{
char str[] = "www.rntsoft.com";
vector vectorObject, vectorObject2(30);
unsigned int i;
for(i = 0; str[i]; i++)
vectorObject.push_back(str[i]);
cout << "Input sequence:\n";
for(i = 0; i cout << vectorObject[i];
cout << endl;
remove_copy(vectorObject.begin(), vectorObject.end(), vectorObject2.begin(), ' ');
cout << "Result after removing spaces:\n";
for(i = 0; i cout << vectorObject2[i];
cout << endl << endl;
cout << "Input sequence:\n";
for(i = 0; i cout << vectorObject[i];
cout << endl;
// replace spaces with colons
replace_copy(vectorObject.begin(), vectorObject.end(), vectorObject2.begin(), ' ', ':');
cout << "Result after repacing spaces with colons:\n";
for(i = 0; i cout << vectorObject2[i];
cout << endl;
return 0;
}