The code above is located in a source file, where the function isAlphanumeric passes a char value, and Message is the struct containing the string I want to access. Below is the declaration of the struct and string located in the corresponding header file.
My frustration comes when I try to call and assign messageText like the tutorial does to its private members, but I keep getting an error saying I can't access the string because it is a private member. Is there a way to access the string without having to pass it through the function wordBeginsAt?
Yeah! I'm sorry, bool wordBeginsAt (int pos); already exists int the struct, I just forgot it add it in the description. Your suggestion is actually the first thing I tried doing, however I get an error saying 'messageText' in function 'wordBeginsAt' was not declared in the scope. Do I have to declare something in the source file (besides #include "header.h") to access the string?