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 28th, 2003, 09:16 AM
Registered User
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with arrays needed

I am having a problem with arrays. I have got a string of notes which i am going to output to a MIDI device. I need to reverse the array or make a new one with the reverse of the previous contents. Please help me , I am very stuck and would much appreciate any help. Cheers

Mike

Please email me if u are willing to help
[email protected];)

Reply With Quote
  #2 (permalink)  
Old December 6th, 2003, 10:03 AM
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
have you tried using a for loop with the decrementing operator to reverse the order of the array?
 Say,
 const MAX 10
 int num[MAX];
  for(int i=MAX;i>0;--i)
    {
      num[i]=note
    }
 I don' whether i'm on point.
 Bye, Programmed.


Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
arrays Moharo PHP How-To 2 April 7th, 2016 01:16 PM
Help With Arrays Crippy Ruby 2 March 6th, 2013 05:59 PM
Help with arrays please Planetx33 Visual C++ 2005 1 April 5th, 2007 02:06 AM
Multidemmesional Arrays OR arrays gmoney060 Classic ASP Basics 3 November 1st, 2004 03:42 PM





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