I need to write a short program in C to split a string value into two and assign them to two different variables.
Example:
Original string is "Switch1/Port1"
split the string at the "/" and assign them to:
first variable = Switch1
second variable = Port1
I have read about find_last_of and find_first_of functions but not quiet understand how they work.
Any help would greatly appriciated.
Thanks,
Bob.
Example:
Original string is "Switch1/Port1"
split the string at the "/" and assign them to:
first variable = Switch1
second variable = Port1
I have read about find_last_of and find_first_of functions but not quiet understand how they work.
Any help would greatly appriciated.
Thanks,
Bob.
Comment