Does it have to be a win32 app or can it be a console app?
[edit]
Ooops, just realised you've done the app and just need to add the chars!
I'm not into C++ really, I prefer C so here is your app in C which you can prehaps get some pointers from (pun kind of intended. ).
John
Code:
#include<stdio.h>
#include<string.h>
int main(int argc, char **argv) {
char *my_string="Hello Moto!";
unsigned int count=0;
unsigned int total=0;
while (count<strlen(my_string)) {
printf("Adding character '%c' (%i)\n",*(my_string+count),*(my_string+count));
total+=*(my_string+count);
count++;
}
printf("\nTotal value of this string = %i\n",total);
return 0;
}
[further edit]
Attached a compiled version for you.
Social Networking Bookmarks