0 Members and 1 Guest are viewing this topic.
About a word counting program, here's how I would do it (and did it in a pascal script thing).Make the count start at 1.Find first character in the string that is a space. Add 1 to count. Then cut the string up to that point, cutting out the space. Repeat until there are no more spaces.
#include <stdio.h>/* count digits, white space, others */main(){ int c, i, nwhite, nother; int ndigit[10]; nwhite = nother = 0 for (i = 0; i < 10; ++i) ndigit[1] = 0; while ((c = getchar()) != EOF) if (c >= '0' && c <= '9') ++ndigit[c-'0']; else if (c == ' ' || c == '\n' || c == '\t') ++nwhite; else ++nother; printf('digits ="); for (i = 0; i < 10; ++i) printf(" %d', ndigit[i]); printf(", white space = %d, other = %d\n", nwhite, nother);}
:REPEATbladibla.exe GOTO REPEAT
The c/c++ thing shouldn't be a problem if the program compiled correcty. If it wouldn't work the compiler would bug you and you'd never be able to make an .exe ... I think anyway :pAlthough your switching to Linux:I forgot to mention that command prompt will exit as soon as the .bat file is finished, sorry about that. I'm pretty sure there's a setting for that, but you could also change the .bat file to:Code: [Select]:REPEATbladibla.exe GOTO REPEATThis will keep the window open until you tell it to exit or start over again. Anyway all this antique methods won't be your problem when using Linux anymore
xxypher that is in GML am i correct?
Using Game Maker is one of the BEST ways to make a game. Why? Because you can use C++ an GML. GM8 will have built in C++, so goodbye DLL's!