Ok I have been circling a long time thanks to issues with char pointers & strings.My question is how do I get a function to return a string value?Do I declare all variables as string or do I create a char array for the string m passing and pass a char pointer to the the array to my functions?Also if I deal solely with strings, I can use str.length(). strcmp etc but when I use char pointers, how do I find the length of the string the pointer is pointing to or do comparisons. This is what I have been tryting to find out for so long but have yet to get a satisfactory answer. PLS HELP, I really need to know & get my program working.I don't have much time, could someone care to help?
Also when I use strings, my program doesn't seem to work. I would really like to get a fast solution.
If you are using std::strings, there is hardly ever any reason to use char*'s at all. Just have your functions return std::strings and take them as parameters.