#include
#include
#include
using namespace std;
int main()
{
char str[] = "This is a test.";
vector v, v2(30);
unsigned int i;
for(i=0; str[i]; i++) v.push_back(str[i]);
cout << "Input sequence:\n";
for(i=0; i cout << endl;
// replace spaces with colons
replace_copy(v.begin(), v.end(), v2.begin(), ' ', ':');
cout << "Result after replacing spaces with colons:\n";
for(i=0; i cout << endl << endl;
return 0;
}