In my code I'm trying to find "numbers", "identifiers", and "words". Numbers are defined as sequences of numbers that are separated by a letter , non-letter, or a non digit character( such as a space or /n).
Such as: 898A111 (This has two numbers) 898 111 (This also has two numbers)
Words are defined as a letter leading a sequence of numbers, letters, or both.
Such as: AJKALJ8923 or ALSJOIA or B93082092 (These are all considered words)
And Identifiers are the letters used to lead a word, or separate two numbers
Such as:
898A111 (The Identifier is A)
AJLKAKA (The Identifier is A)
I've been trying to scribble out possible solutions, and as far as checking words I believe I have a solution, but as far as counting and identifying both "numbers" and "identifiers" (in a string), I'm at a complete loss. Anyone have any ideas? Any help at all would be appreciated. I'd say my knowledge of C++ is at a beginner's level.
Main function:http://pastebin.com/MrXKLXYv
Header file: http://pastebin.com/Xn23zn7X
Assignment for reference if I was unclear: http://pastebin.com/2bgEPqbG