--- In [email protected], Thomas Hruska <thru...@...> wrote:
>
> real wrote:
> > hi
> > while compiling text this type of error massege came.
> > i rechecked my text every thing was ok.
> >
> > i am not able to understand the massage. pl guide what is the
error
> >
> > thanks
> >
> > Checking file dependency...
> > Compiling text.cpp...
> > [Error] text.cpp:54: parse error before `if'
> > [Error] text.cpp:64: `N' undeclared (first use this function)
> > [Error] text.cpp:64: (Each undeclared identifier is reported only
once
> > [Error] text.cpp:64: for each function it appears in.)
> > [Error] text.cpp:64: `n' undeclared (first use this function)
> >
> > 5 error(s), 0 warning(s)
>
> Unlike other languages (e.g. PHP), C/C++ requires you to declare
your
> variables and their types before you use them.
>
> Show source code if you want more help.
>
> --
> Thomas Hruska
> CubicleSoft President
> Ph: 517-803-4197
>
> *NEW* MyTaskFocus 1.1
> Get on task. Stay on task.
>
> http://www.CubicleSoft.com/MyTaskFocus/
thanks here is sorce code of guessgame.cpp that i tried to rectifed
post massege earlier
#include<iostream.h>
#include<time.h>
#include<stdlib.h>
#include<conio.h>
int main(void)
{
int score,leftchances,number,guessnumber;
leftchances=6;
score=0;
int randomize();
number=int (rand()%100);
char input;
clrscr();
start:
cout<<"\n Welcome To Number Guessing Game";
cout<<"\n Computer Will Select Number In Between 0 To 100";
cout<<"\n You Will Be Given Six Chances To Guess That Number\n";
do
{
cout<<"\n"<<leftchances<<":Guses Remaining\n";
cin>>guessnumber;
if(guessnumber>100||guessnumber<0)
{
cout<<"\n Your Guess Should Be In Between 0 To
100 Numbers Only";
leftchances--;
}
if(guessnumber>number)
{
cout<<"\n Your Guess Is HIGH";
leftchances--;
}
if(guessnumber<number)
{
cout<<"\n Your Guess Is LOW";
leftchances--;
}
if(guessnumber==number)
{
cout<<"\n CONGRATULATIONS YOUR GUESS IS
CORRECT";
cout<<"\n the number was"<<number;
score=leftchances*10;
cout<<"\n Your Score Is "<<score;
break;
}
while((guessnumber!=number)&&(leftchances!=0))
if (leftchances==0)
{
cout<<"\n Sorry You Could Not Guess";
cout<<"\n The Number Was"<<number;
score=leftchances*10;
cout<<"\n Your Score Is"<<score;
cout<<"\n Remaining Guesses"<<leftchances;
}
cout<<"Want To Play Again Press Y";
cin>>"input";
if ((input=='Y' || input=='y'))
return 0; /* this one is the line no.66*/
[Error] C:\Program Files\C-Free 4\mingw32\Untitled1.cpp:66: parse
error at end of input
thanks
>