Skip to content

Instantly share code, notes, and snippets.

@jmoren
Last active February 16, 2016 23:49
Show Gist options
  • Select an option

  • Save jmoren/6e638778d10161f726ba to your computer and use it in GitHub Desktop.

Select an option

Save jmoren/6e638778d10161f726ba to your computer and use it in GitHub Desktop.
while(!feof(f1)){
Enemigo e;
fscanf(f1, "%i, %i, %f, %i", &e.posx, &e.posy, &e.fuerza, &e.radio );
if(feof(f1)){ break;}
enemigos.push_back(e);
}
while(!feof(f2)){
Personaje p;
p.ciclos = 0;
p.recorrido = 0;
fscanf(f2, "%s %i %i %f %f", p.id, &p.posx, &p.posy, &p.vida, &p.escudo );
if(feof(f2)){ break;}
personajes.push_back(p);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment