Thread: Circularly Shifting Array

  1. #1
    Registered User
    Join Date
    Nov 2013
    Posts
    2

    C

    edit
    Last edited by cmoored; 11-19-2013 at 09:57 PM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Unfortunately, at the moment you have failed to initialise (or even declare) the array properly and are not a position to check whether or not your shiftArray function works even after you implement it.

    Start at the beginning: write a program to initialise and print the array. Once you have that done correctly, think about simple cases of shifting and then implement them. As you investigate the problem further, you should eventually be able to develop and proper algorithm for the shifting that you want to do and implement it.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. shifting elements in array
    By gamers18 in forum C++ Programming
    Replies: 5
    Last Post: 12-09-2012, 12:28 PM
  2. shifting 1D array items down
    By taurus in forum C Programming
    Replies: 4
    Last Post: 09-29-2009, 03:15 PM
  3. Array Shifting C++
    By Flaug in forum C++ Programming
    Replies: 24
    Last Post: 04-13-2009, 09:40 AM
  4. Array shifting help
    By viclaster in forum C Programming
    Replies: 13
    Last Post: 11-16-2003, 07:50 PM
  5. shifting array elements
    By dP munky in forum C Programming
    Replies: 5
    Last Post: 04-17-2003, 01:35 PM

Tags for this Thread