I am working on a command line program that communicates with another program. What i am trying to do is after i write a command
it will split the string so the number on the end will be put into a seperate variable. For example if i write the line opennotepad/100
i want the program to take the number at the end and put it in into a seperate variable. Also after that i will need it to convert that integer so it can be sent over winsock.
I am using two variables to split the string.

Thank you.

Recommended Answers

All 2 Replies

What kind of string?
STL?
MFC?
char[]?
CLI?

boost string algorithms can help you out here. As well as boost lexical_cast.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.