943,753 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2721
  • C RSS
Jul 1st, 2004
0

Need help on a program (function bug)

Expand Post »
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();
}
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
awmp-jansen is offline Offline
1 posts
since Jul 2004
Jul 1st, 2004
0

Re: Need help on a program (function bug)

Did you mean to call the function?
  1. case 4:{
  2. clrscr();
  3. affichage2(); /* <===== BUG : Declaration is not allowed here */
  4. }
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Assign content to a function pointer
Next Thread in C Forum Timeline: how to simulate mouse movement and click





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC