Working w/ strings (again)
I'm really having a hard time on this but I thought I'd ask my concerns here because there are some of you who are really more experienced on this than me.
I am currently working on a word game on the side together w/ a big project and I have a couple of quick questions when working w/ strings as mentioned below. I would appreciate it if you can lend a hand and shed me some light on this topic.
1. I have this code:
Q: How do I parse temp such that I will be able to blit each letter on the screen separately? i.e. Blit("E"), Blit("R")...
2. In VB, there's a function there called "Mid" where you can copy a number of letters from a string by specifiying its position and length, is there an easy way to do this in C? Any API?
3. Lastly, I was able to convert a character to its ascii value by casting (int) on it. How do I convert an ascii value to its corresponding character now? (A --> 65, 65 --> A?)
Thanks!
Erick
I'm really having a hard time on this but I thought I'd ask my concerns here because there are some of you who are really more experienced on this than me.
I am currently working on a word game on the side together w/ a big project and I have a couple of quick questions when working w/ strings as mentioned below. I would appreciate it if you can lend a hand and shed me some light on this topic.
1. I have this code:
- Code:
TCHAR temp[8];
_tcscpy(temp, TEXT("ERICK");
Q: How do I parse temp such that I will be able to blit each letter on the screen separately? i.e. Blit("E"), Blit("R")...
2. In VB, there's a function there called "Mid" where you can copy a number of letters from a string by specifiying its position and length, is there an easy way to do this in C? Any API?
3. Lastly, I was able to convert a character to its ascii value by casting (int) on it. How do I convert an ascii value to its corresponding character now? (A --> 65, 65 --> A?)
Thanks!
Erick