DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   homework help (http://www.daniweb.com/forums/thread94316.html)

stokes323 Oct 25th, 2007 8:43 pm
homework help
 
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;

Ancient Dragon Oct 25th, 2007 9:26 pm
Re: homework help
 
post what you have done so far. you should probably be able to write the skeleton for the find_a function.

stokes323 Oct 25th, 2007 9:35 pm
Re: homework help
 
honestly all i have is....

int main()
{
cout find_a(cin);
return 0;
}

im not very good with this

stokes323 Oct 25th, 2007 9:40 pm
Re: homework help
 
id even take some type of tutorial if there was one...

stokes323 Oct 25th, 2007 10:43 pm
Re: homework help
 
I also know that my input data type is char and my out data type is int...

Ancient Dragon Oct 25th, 2007 10:59 pm
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.


All times are GMT -4. The time now is 4:20 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC