what does this error mean

i'm using a case statement and i get an error in vc++.NET

ERROR:'readme' : fully prototyped functions required in C compiler with the '/clr' option


[code]
#include
#include

//This function displays the menu to the screen and accepts the users choice
//Input parameters:Nil
//Output parameters:Nil
void menu()

{
int choice; //variable to accept the users choice

system("cls"); //clears the screen so as to clearly display the menu and option prompt
printf("
");
printf(" TOKEN TUG-O-WARRIOR

");
printf(" [1] Play Game

");
printf(" [2] Instructions

");
printf(" [3] Exit

");
printf(" Choice:");
scanf("%d",&choice); //recives user choice

switch(choice)
{
case 1:
//gameplay(); //calls the gameplay fucntion
break;
case 2:
readme(); //allows users to read the instructions
break;
case 3:
system("cls");
printf("Exiting...
"); //allowsuser to exit the game
system("pause");
exit(1);
break;
default:
printf("invalid option"); //error checking for invalid option
system("pause");
menu();
break;
}
}

[/code]

Comments

  • : i'm using a case statement and i get an error in vc++.NET
    :
    : ERROR:'readme' : fully prototyped functions required in C compiler with the '/clr' option
    :
    :
    : [code]
    : #include
    : #include
    :
    : //This function displays the menu to the screen and accepts the users choice
    : //Input parameters:Nil
    : //Output parameters:Nil
    : void menu()
    :
    : {
    : int choice; //variable to accept the users choice
    :
    : system("cls"); //clears the screen so as to clearly display the menu and option prompt
    : printf("
    ");
    : printf(" TOKEN TUG-O-WARRIOR

    ");
    : printf(" [1] Play Game

    ");
    : printf(" [2] Instructions

    ");
    : printf(" [3] Exit

    ");
    : printf(" Choice:");
    : scanf("%d",&choice); //recives user choice
    :
    : switch(choice)
    : {
    : case 1:
    : //gameplay(); //calls the gameplay fucntion
    : break;
    : case 2:
    : readme(); //allows users to read the instructions
    : break;
    : case 3:
    : system("cls");
    : printf("Exiting...
    "); //allowsuser to exit the game
    : system("pause");
    : exit(1);
    : break;
    : default:
    : printf("invalid option"); //error checking for invalid option
    : system("pause");
    : menu();
    : break;
    : }
    : }
    :
    : [/code]
    :



    You are using the function "system" in the code for calling the system functions and paasing thedos commands.
    but ssytem is a namespace in .NET fromawork. soyou should find somediffrent way of getting your work done.

    for .NET "System" is namespace and cannot be used as anfunction.

    Pravin
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion