mjs84
Aerospace
- Aug 20, 2003
- 27
I am a new C++ programmer that has been thrust into the belly of the C++ beast. I am having problems with trying to extract a substring from a string. The string and substrings will be of varying length, what I do know is I want to start grabbing the text after the last '\' until and keep grabbing until i hit the last '.'. Yes, I am trying to pull a piece of a file string.
ie...
str = "\\ddata\conf\src\bin\d_5032.dat"
I am trying to pull the "d_5032" from the string above and I want to assign it to a variable. I am using MS Visual C++ 6.0. Any help would be greatly appreciated.
ie...
str = "\\ddata\conf\src\bin\d_5032.dat"
I am trying to pull the "d_5032" from the string above and I want to assign it to a variable. I am using MS Visual C++ 6.0. Any help would be greatly appreciated.