Thread: i need some help ><

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    8

    i need some help ><

    hi everybody i'm new to this msg board
    currently i'm working on a task which involves mazing
    i have learnt C++ for a month and must say i am not very good at it
    well while i was coding, my friend took a look at my codes and told me i have a major mistake and ever since then i've been staring at the script and cant figure it out
    can someone help me out here? by the way this is not complete
    Code:
    #include <iostream.h>
    
    using std::cout;
    using std::cin;
    using std::endl;
    
    int seekRoad(char [4][6], int, int);
    
    int main() 
    {
             
        char maze[][6] = {{'S', 'R', 'X', 'X', 'X', 'X'},
                           {'X', 'R', 'X', 'X', 'R', 'E'},
                           {'X', 'R', 'R', 'X', 'R', 'X'},
                           {'X', 'X', 'R', 'R', 'R', 'X'}};
    
    
        cout << "Start X = 0\n";
        cout << "Start Y = 0\n\n";
    
        int result = seekRoad(maze, 0, 0);
        if (result == -1) {
          cout << "No exit!\n";
        if (maze [x][y+1] =="R" );  
      else if (maze [x][y-1] == "R");
      else if (maze [x+1][y] == "R");
      else if (maze [x-1][y] == "R");
        }
    
        return 0;
    }
    Last edited by kid1412; 10-26-2006 at 10:05 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. primitive question ><
    By MicroFiend in forum Game Programming
    Replies: 5
    Last Post: 10-14-2005, 10:14 AM
  2. STEP turbo C 3.0 >< Borland 5.02
    By Huh..... in forum C Programming
    Replies: 0
    Last Post: 03-12-2002, 07:54 AM
  3. searching ><
    By hyaline in forum C Programming
    Replies: 1
    Last Post: 09-16-2001, 05:29 AM