I need a function that will search a file byte by byte until it reaches a special string "<!--$$(" when this is found it will extract what it is found until it reaches the ")". There will be more than just a once occurence of that special string.

Does anyone have an exampple of something similar or could someone point me in the right direction. I was hoping to use something like Mid from VB but it doesn't seem to have the same function in C++.

Any help would be greatly appreciated