homework help

Reply

Join Date: Oct 2007
Posts: 4
Reputation: stokes323 is an unknown quantity at this point 
Solved Threads: 0
stokes323 stokes323 is offline Offline
Newbie Poster

homework help

 
0
  #1
Oct 25th, 2007
I'm trying to write a program for a homework assignment and basically have no idea what to do now... if anyone could help me by pointing me in the right direction it would really help....

Write a C++ program that includes a function called "find_a()". This function will take a arbitrary input stream reference as a parameter, then read characters in from the stream until it finds an 'a'. The function should then return the number of characters read.

Your main function for this assignment only needs two lines of code:
cout find_a(cin);
return 0;
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,160
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1437
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: homework help

 
0
  #2
Oct 25th, 2007
post what you have done so far. you should probably be able to write the skeleton for the find_a function.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 4
Reputation: stokes323 is an unknown quantity at this point 
Solved Threads: 0
stokes323 stokes323 is offline Offline
Newbie Poster

Re: homework help

 
0
  #3
Oct 25th, 2007
honestly all i have is....

  1. int main()
  2. {
  3. cout find_a(cin);
  4. return 0;
  5. }

im not very good with this
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 4
Reputation: stokes323 is an unknown quantity at this point 
Solved Threads: 0
stokes323 stokes323 is offline Offline
Newbie Poster

Re: homework help

 
0
  #4
Oct 25th, 2007
id even take some type of tutorial if there was one...
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 4
Reputation: stokes323 is an unknown quantity at this point 
Solved Threads: 0
stokes323 stokes323 is offline Offline
Newbie Poster

Re: homework help

 
0
  #5
Oct 25th, 2007
I also know that my input data type is char and my out data type is int...
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,160
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1437
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: homework help

 
0
  #6
Oct 25th, 2007
Do you have a textbook ? Have you read it ? If not, why not. Read the Read Me threads at the top of this board and you will find lots of information that may help you.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC