3 Replies - 2417 Views - Last Post: 02 August 2012 - 05:58 AM Rate Topic: -----

#1 <kate>  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-August 12

how can i check the error " function should have prototype"?

Posted 02 August 2012 - 04:45 AM

#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<string.h>
char ans;
main()
{
textcolor(13);
clrscr();
cout<<endl<<"would you like to play  pass the message?<Y/N>";
cin>>ans;
ans=toupper(ans);
while (ans=='Y');
{
clrscr();
cout<<endl<<"cuddly cows graze in grooves or grass "<<endl
    <<"in w/c grows on groves in grooves"<<endl<<endl;
cout<<endl<<"Do you want other try?<Y/N>";
cin>>ans;
ans=toupper(ans);
while (ans=='y');
}
clrscr();
cout<<"Thank you for playing tongue twister:>>"<<endl<<endl<<endl;
getch();
return(0);
}


pls.. answer my question po.. i need it right now..

This post has been edited by Atli: 02 August 2012 - 04:56 AM
Reason for edit:: Please use [code] tags when posting code.


Is This A Good Question/Topic? 0
  • +

Replies To: how can i check the error " function should have prototype"?

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 3845
  • View blog
  • Posts: 11,749
  • Joined: 25-December 09

Re: how can i check the error " function should have prototype"?

Posted 02 August 2012 - 05:32 AM

Quote

pls.. answer my question po.. i need it right now..


What question? If you are getting compile errors, post the complete error message exactly as it appears in your development environment.

Since you are using a seriously outdated compiler, that most people will not have, you need to tell us exactly what is wrong, since this code will not compile on a modern compiler. You need to seriously look for a new compiler and switch.

Jim
Was This Post Helpful? 0
  • +
  • -

#3 <kate>  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-August 12

Re: how can i check the error " function should have prototype"?

Posted 02 August 2012 - 05:55 AM

View Postjimblumberg, on 02 August 2012 - 05:32 AM, said:

Quote

pls.. answer my question po.. i need it right now..


What question? If you are getting compile errors, post the complete error message exactly as it appears in your development environment.

Since you are using a seriously outdated compiler, that most people will not have, you need to tell us exactly what is wrong, since this code will not compile on a modern compiler. You need to seriously look for a new compiler and switch.

Jim

as i run it,,. it only appears "function toupper should have a prototype"
how is that?
Was This Post Helpful? 0
  • +
  • -

#4 jimblumberg  Icon User is offline

  • member icon


Reputation: 3845
  • View blog
  • Posts: 11,749
  • Joined: 25-December 09

Re: how can i check the error " function should have prototype"?

Posted 02 August 2012 - 05:58 AM

Every function must either have a prototype or be implemented before the point where it is used. You need to look up this function in your compiler's documentation and determine what header file you must include to use this function.

Jim
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1