Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 7th, 2007, 04:07 PM
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









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.