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.

I need help finding out how to fix this.

0 votes
asked Dec 6, 2018 by Christopher Shucart (130 points) 1 flag

I'm new to programming in c++ and I want to know how to solve this

expected unqualified-id before ‘{’ token

1 Answer

0 votes
answered Dec 10, 2018 by anonymous

From just this one line of debugging, we can presume that the word to the left of the { is either missing or not recognized in C++.

The { means "begin"  and it encapsulates a group of code lines.
Of course, at the end of all the code lines to be included in that bundle we use } which means "end".

Here is quick example program of this.
Notice that the word MAIN is put in front of the { which means "begin" the MAIN function of the program.

#include <iostream.h>

  int main()

  {

  for (int i = 32; i<128; i++)

        cout << (char) i;

        return 0;

  }

The program instructions continue until the closing } which "ends" the function and therefore the program.

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.
...