[ create a new paste ] login | about

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

C++, pasted on Oct 31:
#include <iostream>

using namespace std;

int main()
{
    int n, m, n1 = 0, m1 = 0, Century = 0;
    cin>> n>> m;
    char forest[n][m];
    for(n1 < (n + 1); n1++;)
    {
        for(m1 < (m + 1); m1++;)
        {
            cin>> forest[n1][m1];
        }
    }
    for(n1 < (n + 1); n1++;)
    {
        for(m1 < (m + 1); m1++;)
        {
            cout<< forest[n1][m1]<< " ";
        }
        cout<< '\n';
    }


    return 0;
}


Output:
1
2
3
In function 'int main()':
Line 9: error: ISO C++ forbids variable-size array 'forest'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: