Need BigTime Help.
I am having a great deal of trouble with strings and chars in C++. Judging by the posts at this site, I see I'm not alone. Other programming languages give me no problem -- I can manipulate strings pretty well. Here is my problem.
How can output a string type variable into a windows rectangle? DrawText(HDC,LPCTSTR,int,LPRECT,UINT) expects a char pointer as LPCTSTR but the data is declared as a string type. I need the data as a string type because I need to extract it from a string using "string.find". Can I convert the extracted string to char? If not, how do extract a substring from char. In other words, does there exist, or can I create a similar function to do the same thing with char as "string.find" does with strings.
Let me try to make this clear:
string mystring="123456789" mystring.find("3",0) returns position 4.
char *mychar="123456789" how do I find the position of "3"?