Question: / * * StringParserClass.h * * Created on: Oct 8 , 2 0 1 7 * Author: keith * / #ifndef STRINGPARSER _ H _
StringParserClass.h Created on: Oct Author: keith #ifndef STRINGPARSERH #define STRINGPARSERH #include #include namespace KPStringParserClass class StringParserClass public: dont forget to initialize member variables StringParserClassvoid; call cleanup to release any allocated memory virtual ~StringParserClassvoid; these are the start tag and the end tags that we want to find, presumably the data of interest is between them, please make a COPY of what pStartTag and pEndTag point to In other words DO NOT SET pStartTag pStart returns: SUCCESS ERRORTAGSNULL if either pStart or pEnd is null int setTagsconst char pStart const char pEnd; First clears myVector going to search thru pDataToSearchThru, looking for info bracketed by pStartTag and pEndTag, will add that info only to myVector returns SUCCESS finished searching for data between tags, results in myVector or more entriesERRORTAGSNULL if either pStart or pEnd is null ERRORDATANULL pDataToSearchThru is null int getDataBetweenTagschar pDataToSearchThru std::vector &myVector; private: void cleanup; Searches a string starting at pStart for pTagToLookFor returns: SUCCESS found pTagToLookFor, pStart points to beginning of tag and pEnd points to end of tag FAIL did not find pTagToLookFor and pEnd points to ERRORTAGSNULL if either pStart or pEnd is null int findTagchar pTagToLookFor char &pStart, char &pEnd; char pStartTag; char pEndTag; bool areTagsSet; ; #endif
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
