🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #338

BESOIN D'AIDE AVEC SUPER POINTEURS

#338
From: Sylvere.Cochelin
Date: Sat, 05 Feb 2000 00:00
83 lines
2348 bytes
J'aimerais savoir pourquoi ce programme ne marche pas.
Il y a aucune erreur � la compilation et � l'execution, le prog bloque sur
mon super pointeur (spf). Je ne vois pas pourquoi.
-Peut-�tre qu'il a mal �t� envoy� entre les fonctions, je ne sais pas.

P.S. : Si vous pouviez me r�pondre assez rapidement, ca serait cool
Avant Lundi par exemple.

Merci d'avance

Voila le programme :


#include"H1.h"

void main(void)
{

struct FILM * pdfilm=NULL,** spf;

char code;
void FC(struct FILM **);

printf("MENU\n");
printf("\t Code C\n");
printf("Entrer un code\n");
while((code=getchar())!='F')
{
 if(code=='C')
   FC(spf);
}
printf("fin du programme\n");

}

****************************************************

void FC(struct FILM ** spf)

{
struct FILM ** RECHERCH_F(char[],struct FILM **,int *);

char ZL[40];
int cc;
struct FILM ** spfb;

printf("Entrer le nom du film\n");
gets(ZL);
spfb=RECHERCH_F(ZL,spf,&cc);
  if(cc==0)
  {//trouv�
   printf("FILM EXISTANT\n");
   return;
  }

printf("Gagn�\n");
gets(ZL);
}

****************************************************

struct FILM ** RECHERCH_F(char ZL[],struct FILM ** sp,int * cc)
{
int comp=1;
for(;*sp&&(comp=strcmp(ZL,(*sp)->titre))>0;sp=&((*sp)->filmsuiv));
if(comp==0)
  *cc=1;
else
  *cc=0;
return(sp);
}

****************************************************

#include<stdio.h>
#include<string.h>


struct FILM
{  char * titre;
    int date;
 struct FILM * filmsuiv;
};
Technical Details
Message-ID: <87i0rg$oea$1@wanadoo.fr>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: f8d38,35edeee3f1ee15bd,start
X-Google-Attributes: gidf8d38,public
X-Google-Thread: f7a51,35edeee3f1ee15bd,start
X-Google-Attributes: gidf7a51,public
X-Google-Thread: 114592,35edeee3f1ee15bd,start
X-Google-Attributes: gid114592,public
From: <Sylvere.Cochelin@wanadoo.fr>
Subject: BESOIN D'AIDE AVEC SUPER POINTEURS
Date: 2000/02/05
Message-ID: <87i0rg$oea$1@wanadoo.fr>
X-Deja-AN: 582015926
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: abuse@wanadoo.fr
X-Trace: wanadoo.fr 949782192 25034 164.138.103.227 (5 Feb 2000 20:23:12 GMT)
Organization: Wanadoo, l'internet avec France Telecom
NNTP-Posting-Date: 5 Feb 2000 20:23:12 GMT
Newsgroups: alt.comp.lang.learn.c-c++,borland.public.cpp.language,microsoft.public.vc.language