C++可以用指针数组从字符串中提取子字符串么?

C++可以用指针数组从字符串中提取子字符串么?
如果可以请给一个示范QAQ

http://www.cnblogs.com/xiangzi888/archive/2012/04/16/2451947.html

/* strtok example */
#include <stdio.h>
#include <string.h>

int main (void)
{
    char str[] = "- This, a sample string.";
    char *pch;
    printf("Splitting string \"%s\" into tokens:\n", str);
    pch = strtok(str," ,.-");
    while (pch != NULL)
    {
        printf("%s\n", pch);
        pch = strtok(NULL, " ,.-");
    }
    printf("at the end: %s", str);
    return 0;
}

/* strtok example */
#include
#include

int main (void)
{
char str[] = "- This, a sample string.";
char *pch;
printf("Splitting string \"%s\" into tokens:\n", str);
pch = strtok(str," ,.-");
while (pch != NULL)
{
printf("%s\n", pch);
pch = strtok(NULL, " ,.-");
}
printf("at the end: %s", str);
return 0;
}

http://www.cnblogs.com/xiangzi888/archive/2012/04/16/2451947.html