Quote: "1. is there any way to make a string of characters with an indefinite length, one that can be changed"
If you use the std::string type, you don't need to worry about length much. The functions of this class take care of changing the length dynamically as needed.
(Note that in character arrays, the null terminator signifies the end of the string, so you can actually change the length by replacing the null terminator, although the maximum size of the allocated memory does not change in this case.)
Quote: "2. is there any kind of way to see if a string is located within another, i.e. search a file name for an extension, if not, place the extension at the bottom"
Yes, again the std::string class has several forms of "find" functions to search a substring and it also has "replace" and "append" functions to change or add extension, for example.
Quote: "5. what is the difference between char and char * ?"
- "char" is one character.
- "char[5]" is an array of 5 characters (which would include a usable length of 4 characters, by the way, because length needs to include the null terminator).
- "char *" is a pointer to a character, or to an array of characters. If you don't know what a pointer is, read a C++ language reference because the language relies very often on the use of pointers.
When you use Dark GDK, you sometimes need character pointers, for example to write text to the screen you use dbText which expects a char pointer. Where a "char*" is required, you can either:
- pass a constant string to the function, like "dbText(0,0,"write this");
- pass the name of a char array to the function, in this case it takes the pointer to the first character of the array,
- when using std::string, pass the c_str() parameter of the string which gives you the pointer, but in this case there is a need for typecast (easy) because c_str() is constant and the Dark GDK functions expect non-constant parameter,
- pass a char* variable to the function.
Note that you probably don't want to define char* variables yourself too much, because if you do that, you need to allocate the memory for your string, and also take care of de-allocating it when it is no longer needed. Using fixed-size char arrays or the std::string type, you don't have to worry about memory allocation. On the other hand, dynamic memory allocation can be useful if there are so many strings that they take up a lot of memory.
Also, using char arrays is not as horrible as it seems at first sight. There are built-in string handling functions (e.g. strcat, strcpy, strcmp) which work well with character arrays. It's just a question of getting used to the concept, and a question of style if you prefer char arrays or strings.
The question of converting strings to numbers and back has already been answered above. You can do it with those macros, or it can also be done with string streams, or with sprintf / sscanf, or you can even write your own functions.