I am just learning C, I understand now what I would need to do, but I don't feel it necesary to correct it that far... I Will fix it later when I actually make a game that uses it. Thanks go to...
Type: Posts; User: .:Lyle:.
I am just learning C, I understand now what I would need to do, but I don't feel it necesary to correct it that far... I Will fix it later when I actually make a game that uses it. Thanks go to...
my entire program looks like this right now.
#include <stdio.h>
int main(void) {
int input;
printf( "1. Play game\n" );
printf( "2. Load game\n" );
I found the easiest way to do this was simply making the default case look like:
default:
printf( "Bad input, try again" );
continue;
Nothing wrong with...
K... I got it to work... thanks for the help :)
#include <stdio.h>
int main(void) {
int input;
printf( "1. Play game\n" );
printf( "2. Load game\n" );
printf( "3. Play multiplayer\n" );
printf( "4....
When I compile and run this code, and I input a a letter/number above 4 so that it uses default, the output says bad output, try again and it scrolls as it prints to infinity and beyond....
Thank...
While I do not understand very much of the above code, Salem, It gets me out of the program, but doesn't give me another chance to put in a number... right now the block looks like
if(...
Wait, sorry for the double post, but the above code does not work... I tried a few things out, but only when I put the scanf in a code block with the switch
{
scanf( "%d", &input );
...
Cool, I know of goto from.... Some C code I was looking at a while back? Lol I wanted to know if it existed in C... I already know that it is bad practice to use it most ANY situation, but I thought...
Hello people, I am new to this forum, this is my first post. I wanted to introduce myself and ask a question about this code
/* Game menu for any game - remember to specify functions */...