Langage C + SDL =>l'affichage est incorrecte!
Résolu
H.M
-
H.M -
H.M -
A voir également:
- Langage C + SDL =>l'affichage est incorrecte!
- Langage ascii - Guide
- Affichage double ecran - Guide
- Langage binaire - Guide
- Windows 11 affichage classique - Guide
- Problème affichage photo messenger - Forum Facebook Messenger
1 réponse
//n'oublier pas d'ajouter tout vos .dll et les linker chemin project->build option->linker
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>
void afficher(FILE* f,SDL_Surface *ecran);
int main(int argc, char *argv[])
{
FILE *f=NULL;
SDL_Surface* ecran;
SDL_Init(SDL_INIT_VIDEO);
ecran=SDL_SetVideoMode(1300,700,32,SDL_HWSURFACE|SDL_DOUBLEBUF);
f=fopen("fichier.txt","w");
fprintf(f,"0 1 2 3 4 5 6 7");
fclose(f);
f=fopen("fichier.txt","w");
fscanf(f,"%d %d ");//le curseur est a la meme position que 2
afficher(f,ecran);
fclose(f);
SDL_Quit();
}
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>
void afficher(FILE* f,SDL_Surface *ecran);
int main(int argc, char *argv[])
{
FILE *f=NULL;
SDL_Surface* ecran;
SDL_Init(SDL_INIT_VIDEO);
ecran=SDL_SetVideoMode(1300,700,32,SDL_HWSURFACE|SDL_DOUBLEBUF);
f=fopen("fichier.txt","w");
fprintf(f,"0 1 2 3 4 5 6 7");
fclose(f);
f=fopen("fichier.txt","w");
fscanf(f,"%d %d ");//le curseur est a la meme position que 2
afficher(f,ecran);
fclose(f);
SDL_Quit();
}