954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need help on a program (function bug)

hi all.

I submit this program done under Borland beacuse i have a problem running my second function (indicated)

Plz help me.

#include
#include
#include
#include
#include

void affichage();
void affichage2();


void main(int argc, char *argv[])
{
void affichage();
}

void affichage(int argc, char *argv[])
{
int status,choix;
status=0;
do
{
printf(" *** MERCI D'UTILISER ''LUTINSOFT ANTINOOBVIRUS SUITE PRO'' ***\n\n");
printf(" Veuillez choisir votre status:\n\n");
printf(" 1- Utilisateur NOOB au PC plein de Virus\n");
printf(" 2- Utilisateur pret a faire une LAN - virus inclus dans le PC\n");
printf(" 3- Utilisateur sans aucun virus LE GARS PARFAIT\n");
printf(" 4- Le Neophite qui s'est trompe de CD\n");
scanf("%d",&status);
}
while(status<=0 || status>=4);

if(status!=1)
{
printf(" Si vous utlisez ce CD c'est que vous mentez\n");
printf(" *STATUS: Utilisateur NOOB au PC plein de Virus* Choisit par l'admin\n");
}

printf(" MERCI D'AVOIR ACCEPTE VOTRE STATUS\n\n");
clrscr();
}


void affichage2(int argc, char *argv[])
{
int i,choix,choix2;
do
{
printf(" Que voulez vous faire: \n");
printf(" 1- Installer un Antivirus\n");
printf(" 2- Installer un Firewall\n");
printf(" 3- Autre Chose\n");
printf(" 4- Retour");
scanf("%d",&choix);
}
while(choix<1 || choix>2);
switch(choix)
{
case 3:{
printf(" \n5- Se prendre une raclee a CS\n");
printf(" 6- Se faire remonter les bretelles a Starcraft Golem\n");
printf(" 7- Apprendre jouer a Warcraft III\n\n");
scanf("%d",&choix2);
switch(choix2);
{
case 5: printf("Contacter: [email]awmp-jansen@wanadoo.fr[/email]");
case 6: printf("Demander directement Josua - Gosusaurus");
case 7: printf("Demander Bigmoustache - Predator_39");
}
}
case 4:{
clrscr();
void affichage2(); <===== BUG : Declaration is not allowed here
}

}
getch();
}

awmp-jansen
Newbie Poster
1 post since Jul 2004
Reputation Points: 10
Solved Threads: 0
 

Did you mean to call the function?

case 4:{
   clrscr();
   affichage2(); /* <===== BUG : Declaration is not allowed here */
}
Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You