Please help me to translate this code from c to c++
#include <stdio.h>
#include <conio.h>
void main()
{
int n,i,j,a[20][20],ok=1,grade=0,aux=0;ok=1;
FILE *f=fopen("c:\graph.txt","r");
fscanf(f,"%d",&n);
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
fscanf(f,"%d",&a[i][j]);
fclose(f);
for(i=1;i<=n;i++)
if(a[1][i]==1) grade++;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
if(a[i][j]==1) aux++;
if(aux!=grade) ok=0;
aux=0;
}
if(ok==0) printf("graph is not regular.");
else printf("graph is regular.");
getch();
clrscr();
}