Need help on a program (function bug)

Reply

Join Date: Jul 2004
Posts: 1
Reputation: awmp-jansen is an unknown quantity at this point 
Solved Threads: 0
awmp-jansen awmp-jansen is offline Offline
Newbie Poster

Need help on a program (function bug)

 
0
  #1
Jul 1st, 2004
hi all.

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

Plz help me.

#include <process.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <conio.h>

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: awmp-jansen@wanadoo.fr");
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();
}
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,343
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 237
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Need help on a program (function bug)

 
0
  #2
Jul 1st, 2004
Did you mean to call the function?
  1. case 4:{
  2. clrscr();
  3. affichage2(); /* <===== BUG : Declaration is not allowed here */
  4. }
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC