Now, I don't think I'm the right guy to reply because I don't know VB or C++.net, but I do know plain old C++ and I can show you the way to do that in that.
Using Character Arrays:
char userName[4];
strcpy(userName, "r-s");
MessageBox(NULL, userName, "User Name", MB_OK);
Using STL:
#include <string>
//...
std::string userName("r-s");
MessageBox(NULL, userName.c_str(), "User Name", MB_OK);
.Net is probably a lot more like the STL version, but you can use both in a .Net program.
EDIT: Forgot the split part, sorry
Correct me if I'm wrong, but if you call split like you did, it will take a string like "Hi;How are you;I'm fine" and make it "Hi", "How are you", and "I'm fine".
I don't think there is a function that will do this for you, but you could do something like this:
#include <vector>
#include <string>
using namespace std;
void Split(vector<string> &strlist, string &str, string delim)
{
strlist.clear();
int index=0;
int oldindex=0;
while((index=str.find(delim, oldindex))!=string::npos)
{
if(index==oldindex)
index++;
else
{
string newstr;
newstr=str.substr(oldindex, index-oldindex);
strlist.push_back(newstr);
}
oldindex=index;
}
if(oldindex<str.length())
{
string newstr;
newstr=str.substr(oldindex, str.length()-oldindex);
strlist.push_back(newstr);
}
}
Then, when you need to use it you just do this:
vector<string> userInfo;
Split(userInfo, sData, ";");