Thread: The puzzle again...Swapping elements of 2D array

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by crazygopedder View Post
    Yea I know gets would be better but for this assignment it's not necessary. I'm still confused though. I know I need to swap the elements of the array, but like I said earlier we can't change the function prototypes. So swap is destined to swap ints.
    Good! That's what you want!

    Edit: Of course at some point you need to figure out which way the piece can move. (Deciding that the move is valid is not enough--you must know what the move is actually going to be.)
    Last edited by tabstop; 10-24-2008 at 06:37 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Swapping rows in a 2D array
    By bassist11 in forum C Programming
    Replies: 5
    Last Post: 03-11-2010, 12:04 PM
  2. Replies: 16
    Last Post: 05-29-2009, 07:25 PM
  3. 2D array becoming "deallocaded"
    By Aaron M in forum C Programming
    Replies: 2
    Last Post: 09-23-2006, 07:53 AM
  4. Merge sort please
    By vasanth in forum C Programming
    Replies: 2
    Last Post: 11-09-2003, 12:09 PM
  5. 2d Array access by other classes
    By deaths_seraphim in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2001, 08:05 AM