[ create a new paste ] login | about

Link: http://codepad.org/ft8FTNve    [ raw code | output | fork ]

C++, pasted on Oct 3:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class StaticArray{
    private:
        int Array[100];
        uint MaxI;
        uint MaxJ;
    public:
        StaticArray( uint sizex, uint sizey){
            /*... check if either arg is > 10 */
            MaxI = sizex;
            MaxJ = sizey;
        }
        int & operator()( uint i, uint j){
            /*... check bounds of i and j */
            return Array[i*MaxI + j];
        }
};


Output:
1
2
In function `_start':
undefined reference to `main'


Create a new paste based on this one


Comments: