Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

My new c code

Name: Anonymous 2011-08-23 5:08

Hi guys, i just started learning c, so i'm pretty much a noob. I was wondering i my code (which actually works) is messed, and things could have been done better
here it is:

#include <stdio.h>

main()
{
typedef struct giocatore {char player_name[30];} player;
int o;
printf("Inserire il numero di giocatori:");
scanf("%d", &o);
player no_player[o];

if (o == 1)
    printf("Avete scelto la modalità giocatore singolo\n");
else if ( o >= 1)
    printf("Avete scelto la modalità a %d giocatori\n", o);
else
    printf("inserire un valore corretto\n");

int i, e = 0;

for(i = 1; i <= o; i++, e++){
  printf("Inserire il nome del giocatore %d:", i);
  scanf("%s", &no_player[e].player_name);
  };
for(i = 0, e = 1; i < o; i++, e++){
  printf("Giocatore %d: %s\n",e , no_player[i].player_name);
  };
}

Name: Anonymous 2011-08-24 16:07

>>30,31
No it doesn't you stupid piece of shit, that is OS specific.
Holy shit how sub tier can you get? You use an OS and it expands to 0 once and then you expect it to always expand to zero because it did so on your platform, try doing something that is more at your level like working the cash register at targets you mental midget.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List