Q:

I cant return a 2d array without using pointers ! im making a tic tac toe type game and this is my move up function

char[][]  moveup()
{
for (int i=0;i<3;i++)
 {
for (int j=0;j<3;j++)
  {

   if(board[i][j]=='X' && board [i-1][j]=='!' ) {
    board [i][j]='!';
    board [i-1][j]='X';
    }
   }
   }
    return board;
  }

This is my code and I want to pass this 2d array then in to a vector so i want to return a 2d array board without using pointers

A:

You could return a reference to the array:
char(&moveup())[3][3]
{
    for (int i=0; i<3; i++) {
        for (int j=0; j<3; j++) {

            if (board[i][j]=='X' && board[i-1][j]=='!') {
                board[i][j]='!';
                board[i-1][j]='X';
            }
        }
    }
    return board;
}

Here is a full program passing the array by reference. Note how we can now use a range based for loop to iterate over the elements because the reference hasn't decayed to a pointer and the dimensions and type is preserved:
#include <iostream>
#include <vector>

class Board {

public:
    char(&moveup())[3][3]
    {
        for (int i=0; i<3; i++) {
            for (int j=0; j<3; j++) {

                if (board[i][j]=='X' && board[i-1][j]=='!') {
                    board[i][j]='!';
                    board[i-1][j]='X';
                }
            }
        }
        return board;
    }

    char board[3][3];
};

int main()
{
    Board board{
        '.','!','x',
        'o','X','x',
        '.','o','x'
    };

    auto& sameboard = board.moveup();

    for (auto& row : sameboard) {
        for (auto& element : row) {
            std::cout << element;
        }
        std::cout << '\n';
    }

    return 0;
}

