So clear solve for c++
class Solution {\n    public:\n        bool searchMatrix(vector<vector<int>>& matrix, int target) {\n            if(matrix.size() == 0)return false;\n          
    class Solution {\n    public:\n        bool searchMatrix(vector<vector<int>>& matrix, int target) {\n            if(matrix.size() == 0)return false;\n            return searchMatrix(matrix, 0, matrix[0].size() - 1, target);\n        }\n        bool searchMatrix(vector<vector<int>>& matrix, int x, int y, int target) {\n            if(x >= matrix.size() || y < 0)return false;\n            if(matrix[x][y] == target)return true;\n            else if(matrix[x][y] < target) return searchMatrix(matrix, x + 1, y, target);\n            else if(matrix[x][y] > target) return searchMatrix(matrix, x, y - 1, target);\n        }\n    };
[]