Ok I have a program that reads in a .TXT file and displays it as tokens.
What I'm trying to do now is read the file and print out only the reserved words for C++ and the variable it uses.
For example:
int main()
{
double e = 24;
int i = 12;
}
would print out like this
double e
int i
What I have in mind is to create a string that holds the keywords I need to work with and then when I store the token have it check for the keyword, if it is there then store that & it's variable in a 2-d array. Then ignore everything else.
My issue is I have my current token storage declared as a string and when I attempt to put that value into a string array it won't let me.
So my question is what would be the simplest way to accomplish the above. Or basically how would I go about copying the string to the array??