Q:

Using space as delimiter in boost::char_separator

I'm just trying to tokenize some time using Boost.
I want to input 5:00 PM and output <5> <00> <PM>. 
The problem is that I've tried all sorts of things, but it only outputs <5> <00>.
However, if I input 5:00PM, I get the output <5> <00PM>. How can I make boost accept space as a token (alongside :)? It just keeps throwing the PM when the PM is separated from 00 by a space. 
#include "stdafx.h"
#include <iostream>
#include <boost/tokenizer.hpp>
#include <string>
#include <stdlib.h>
#include <boost/algorithm/string.hpp>
using namespace std;
int main(){

    string str1;
cin >>  str1;

typedef boost::tokenizer<boost::char_separator<char> > 
tokenizer;

boost::char_separator<char> sep(":\t ");

string t1 (str1);
tokenizer tokens1(t1, sep);
  for (tokenizer::iterator tok_iter = tokens1.begin();
   tok_iter != tokens1.end(); tok_iter++)
  {cout << "<" << *tok_iter << "> ";}

system("pause");
return 0;
}

A:

It just keeps throwing the PM when the PM is separated from 00 by a space.

It's not throwing. PM just doesn't exist in the str1, since std::cin use space as delimeter too. Replace
cin >>  str1;

With
std::getline(std::cin, str1);

