Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How do I fix this error?

+1 vote
asked Apr 24, 2018 by SavageMango (310 points)
int main()
{
int bowl();
}
//Int bowl is a function i created
main.cpp:153:1: error: a function-definition is not allowed here before '{' token
 {
 ^
main.cpp:155:1: error: expected '}' at end of input
 }

1 Answer

+2 votes
answered Apr 24, 2018 by dasardharam (350 points)
#include<stdio.h>

int bowl();  /*function declaration*/

int main()

{

bowl();    /* function calling*/

}

int bowl()  /*function definition*/

{

}

i hope this format useful to u.

ur declaring function in main so u got that problem.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...