Hello I need help with the following program in borland c + + 5.02.! the application code. #include <iostream>#include <stdio.h>#include <conio.h>#include <iostream.h> class pila{ int vec[20],frente; int max; public: void push_p(int numero); int pop_p(); void establece (int fr,int mx); void listar();};// fin definicion de la clase // implementacion de metodos de la clase void pila::push_p(int numero){ if (frente < max) { vec[frente]= numero; frente = frente + 1; }   else { cout <<"no hay espacio"; getch(); } } int pila::pop_p(){ int valor = -1; if (frente  >= 0)    {valor = vec[frente];     if (frente ==0)   cout <<"ultimo dato";     else   frente = frente -1;}                                           ` else { cout <<"no hay mas datos";  getch();  frente = 0; }return valor;} void pila:: establece(int fr, int mx){frente = fr;max=mx; } void pila ::listar(){for (int i = 0; i<frente; i++) cout <<"pila ["<<1<<"];"<<vec[i]<<";}   errors Info :Compiling C:\BC5\BIN\noname00.cppError:  noname00.cpp(41,2):Illegal character '`' (0x60)Error:  noname00.cpp(62,23):Unterminated string or character constantError:  noname00.cpp(63,2):Statement missing ;Error:  noname00.cpp(63,1):Compound statement missing }

Expert Answers

An illustration of the letter 'A' in a speech bubbles

Although it is difficult to determine where the first error is coming from since you do not include your line numbers, the error on line 41 is that you have put an accent grave in your code instead of a single quotation mark.  C++ only accepts quotation marks (either single or double) and accents (either grave or acute) will cause errors.

On the last line inside your final for loop, you have an extra <<" which is causing the remaining errors.  If you remove those three characters your remaining errors should go away.

Approved by eNotes Editorial Team

Posted on

Soaring plane image

We’ll help your grades soar

Start your 48-hour free trial and unlock all the summaries, Q&A, and analyses you need to get better grades now.

  • 30,000+ book summaries
  • 20% study tools discount
  • Ad-free content
  • PDF downloads
  • 300,000+ answers
  • 5-star customer support
Start your 48-Hour Free Trial