View Single Post
  #1 (permalink)  
Old November 7th, 2007, 04:07 PM
cbgreene9185 cbgreene9185 is offline
Registered User
 
Join Date: Oct 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default need help with C++ PLEASE

I'm writing a program that's due at midnight tonight that uses 5 different functions. I have the last 4 written, but can't figure out how to write the first one. Here is a snippet of what the directions say:

Write the function and call it from the main program
1. A recursive function which receives a string of Zeroes and Ones, at least ten of them. Display what was received, removes the last zero or one from the string and then calls itself if the string length is greater then zero, else it terminates recursion and simply returns.

so far I have used an array, and I just can't figure out how to make the function call itself so that the array displays 1 digit shorter from the end each time until it reaches NULL. Please please help

Reply With Quote