You're mixing together two different things here. Lines 5-8 can only be used in C++/CLI code (C++ with .NET CLR) http://en.wikipedia.org/wiki/C%2B%2B/CLI.
See http://stackoverflow.com/questions/236129/c-how-to-split-a-string for examples of how to do what you are describing. Here's a reference for the istringstream
they use in the first example http://www.cplusplus.com/reference/iostream/istringstream/