Solved

what is (expression syntax)?

Posted on 2016-10-14
11
48 Views
Last Modified: 2016-10-17
the only problem that my code has its expression syntax for one of my printf
how can i solve if help me i would be greatfull tnx
0
Comment
Question by:Sepehr Ghaffari
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 56

Expert Comment

by:Julian Hansen
ID: 41843982
What does your code look like?
0
 
LVL 1

Author Comment

by:Sepehr Ghaffari
ID: 41844139
its a that ask some questions about football from you
in one of my void,printf says has that problem
0
 
LVL 32

Expert Comment

by:phoffric
ID: 41844270
The information you just provided is not enough for us to help you.
If you post your code and the exact error message you get, we should be able to reproduce your problem.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Sepehr Ghaffari
ID: 41844963
this os my code  in my 2nd void i have expression syntax:

#include <stdio.h>
#include <conio.h>

void Function1();
void Function2();
void Function3();
void Function4();

int ans ;

int main()
{
	int menu_item =0;

   gotoxy(20,5);
   printf("Welcom to this game <<football Info>>");

   while(1==1)
   {
      clrscr();
     printf("\nMenu:");
     printf("\n\t[1] Goalkeeper");
     printf("\n\t[2] Defence");
     printf("\n\t[3] Midfilder");
     printf("\n\t[4] Forward");
     printf("Enter your choise:");
     scanf("%d",&menu_item);

     if(menu_item ==0)
      {
         break;
      }//end of if
     else
     {
       clrscr();
       	switch(menu_item)
       	{
         	case 1:
         		Function1();
         		break;
         	case 2:
         		Function2();
         		break;
         	case 3:
         		Function3();
            	break;
         	case 4:
         		Function4();
            	break;

         	default:
         		continue;
         }//end of switch

       	printf("press any key to continue...");
       	getch();

       }//end of else

   }//end of while

   return 0;
}

void Function1()
{
      //int ans1 ;
	printf("\n Who was the  best goalkeeper last year? \n");
		printf("-------------------------------------------");
      scanf("%d",&ans);
   printf("\n Who is the legendary Italian goalkeeper? \n");
   	printf("-------------------------------------------");
		scanf("%d",&ans);
 getche();
}

void Function2()
{
      //int ans2 ;
	printf("\n Who trasfer from manchester united to barcelona in 2008? \n");
		printf("-----------------------------------------");
      scanf("%d",&ans);
   printf("\n Who plays on the left side Borussia Dortmund? \n");
		printf("\n----------------------------------------");
      scanf("%d",&ans);
  getche();
}

void Function3()
{
      //int ans3 ;
	printf("\n How many years Xavi play in Bracelona? \n");
		printf("----------------------------------------",);
      scanf("%d",&ans);
   printf("\n Which irainian Medfilder play in Osasuna? \n");
		printf("\n---------------------------------------");
      scanf("%d",&ans);
 getche();
}

void Function4()
{
		//int ans4 ;
	printf("\n Zelatan play in which club? \n");
		printf("\n----------------------\n");
		scanf("%d",&ans);
   printf("who won 5golden ball? \n");
   	printf("\n----------------------\n");
      scanf("%d",&ans);
 getche();
}

Open in new window

0
 
LVL 40

Accepted Solution

by:
evilrix earned 500 total points
ID: 41845201
Line 93, you have a rogue comma in your printf.

printf("----------------------------------------",);

Open in new window


should be

printf("----------------------------------------");

Open in new window

0
 
LVL 1

Author Closing Comment

by:Sepehr Ghaffari
ID: 41845551
tnx friend
0
 
LVL 40

Expert Comment

by:evilrix
ID: 41845613
Very welcome.
0
 
LVL 1

Author Comment

by:Sepehr Ghaffari
ID: 41845703
sorry friend can you help me again
 when i run my code after answering the question i want program start again from first but my program stop and finish what can i do?
0
 
LVL 40

Expert Comment

by:evilrix
ID: 41845708
You need to ask a new question. This ensures your problem gets maximum expert exposure and also ensures each thread stays focused on one topic.

Many thanks.
0
 
LVL 1

Author Comment

by:Sepehr Ghaffari
ID: 41845710
ok any way thank you friend
0
 
LVL 40

Expert Comment

by:evilrix
ID: 41845714
No worries.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ check and remove last word from a string 5 247
Problem in finding output of a program 11 108
gdb doesn't stop on breakpoint 2 113
delete-remove 14 107
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question