944,092 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 758
  • C++ RSS
Oct 25th, 2007
0

homework help

Expand Post »
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;
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
stokes323 is offline Offline
4 posts
since Oct 2007
Oct 25th, 2007
0

Re: homework help

post what you have done so far. you should probably be able to write the skeleton for the find_a function.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,957 posts
since Aug 2005
Oct 25th, 2007
0

Re: homework help

honestly all i have is....

C++ Syntax (Toggle Plain Text)
  1. int main()
  2. {
  3. cout find_a(cin);
  4. return 0;
  5. }

im not very good with this
Reputation Points: 10
Solved Threads: 0
Newbie Poster
stokes323 is offline Offline
4 posts
since Oct 2007
Oct 25th, 2007
0

Re: homework help

id even take some type of tutorial if there was one...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
stokes323 is offline Offline
4 posts
since Oct 2007
Oct 25th, 2007
0

Re: homework help

I also know that my input data type is char and my out data type is int...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
stokes323 is offline Offline
4 posts
since Oct 2007
Oct 25th, 2007
0

Re: homework help

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,957 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: fibonacci
Next Thread in C++ Forum Timeline: Dynamic Allocating memory





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC