So this is my program so far:
#include <iostream>
#include <windows.h>
using namespace std;
int colonne;
int ligne;
void initDamier (int damier[ligne][colonne])
{
    for (int i = 0; i < ligne; ++i)
        for (int j = 0; i < colonne; ++j)
            damier[i][j]=0; //0=case vide
}
void afficheDamier (int damier[ligne][colonne])
{
    for (int i = 0; i < ligne; ++i)
    {
        cout<<endl;
        for (int j = 0; j < colonne; ++j)
        {
            cout<<damier[i][j]<<"|";
        }
    }
}
int main()
{
    int a,b;
    cout<<"Entrez le nombre de ligne du damier:"<<endl;
    cin>>a;
    ligne=a;
    cout<<"Entrez le nombre de colonne du damier:"<<endl;
    cin>>b;
    colonne=b;
    int damier[ligne][colonne];
    initDamier(damier);
    afficheDamier(damier);
    return 0;
}
I understand why it's not working. In damier[*][*], * has to be either a const or a fixed number. Can someone tell me how to get around this?
 
     
     
     
    