--- In [email protected], "Tyler Littlefield" <ty...@...> wrote: > > first, you need to learn how to call functions. you don't use int randomise(), just randomise if randomize is already declared. > You also don't need to use <iostream.h>, iostream works just fine. same with most other c libraries. > > ----- Original Message ----- > From: real > To: [email protected] > Sent: Wednesday, February 25, 2009 9:46 PM > Subject: [c-prog] Re: compilling error massage > > > --- In [email protected], "peternilsson42" <peternilsson42@> > wrote: > > > > "real" <shrinilesh@> wrote: > > > Thomas Hruska <thruska@> wrote: > > > > real wrote: > > > > > i am not able to understand the massage. > > > > What I Know Is... "Massage is the practice of soft tissue > > manipulation with physical, functional, and in some cases > > psychological purposes and goals." > > > > > > > pl guide what is the error > > > > > > > > > > [Error] text.cpp:54: parse error before `if' > > > > This means that the compiler wasn't able to translate > > your program according to the grammar and syntax rules. > > In other words, either you have a typo (left of a semi- > > colon) or you otherwise haven't coded something > > correctly. > > > > > > > [Error] text.cpp:64: `N' undeclared (first use this > > > > > function) > > > > This means an identifier was used without being declared. > > > > > > > [Error] text.cpp:64: (Each undeclared identifier is > > > > > reported only once > > > > > [Error] text.cpp:64: for each function it appears in.) > > > > This means the compiler is saving you from potentially > > thousands of repeated error messages by only reporting > > the use of a given undeclared variable once. > > > > > > > [Error] text.cpp:64: `n' undeclared (first use this > > > > > function) > > > > This means another identifier was also used without being > > declared. [Note: C and C++ are case sensitive.] > > > > > > > > > > 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. > > > > > > hi this massage comes so many time some times i rectifed it > > > my self without knowing what i am doing > > > > We don't know what you're doing either because you won't > > show us your code. [Did you mispell onomatopoeia on line 42?] > > > > > becouse i am using freec++ and it's highlite the error line. > > > > > > just guide me on what error these massge generated by > > > compiler. > > > > So you think you've fixed the transmission; you just want to > > know what the 'oil' light means?! I'm guessing you have more > > problems than you realise. ;) > > > > -- > > Peter > > sir > > i was trying fix the problem of guess game.cpp that post earlier > > i just begin to learn c++ a week ago. i rectified some of them. > > here is the sorce code of the guessgame.cpp > > #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))/* intial cpp mistake > here*/ > 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; /* here also*/ > } > cout<<"Want To Play Again Press Y"; > cin>>"input"; > if ((input=='Y' || input=='y')) > > /*goto (start;) original i made change reurn */ > 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 > > pl guide me > > thanks. > > > > > thanks
but i dont put int before randomize error comes. pl run the proramme. thanks > > > > [Non-text portions of this message have been removed] >
