I asked a question earlier on here and got some code. This code works perfect for me except its outputs path,file to screen and I need the output in an array and not to the screen.
Do you realize that the std::string class has quite a few member functions? Perhaps you should study the documentation for this important C++ class: http://www.cplusplus.com/reference/string/string/
Also be careful with the find function. Pay very close attention to the return value, especially when the find fails.
Last night I was looking to rewrite this example to work for me. I came up with this and its not in a function and would prefer it to be that way but its working so problem solved for now.