please help me i need a dynamic array that get the information as a matris and give me the vertex degrees (sum every row).and send it to another matrix.
#include "stdafx.h"
#include<conio.h>
#include<iostream>
#include <stdlib.h>
#include <string.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int k,sum;
cout << "Enter the Graph vertex number: ";
cin >> k;
int i, j, *a, b[100];
a = new int [i][j];
cout << "your Gragh is" << k << " , " << k << ", enter your numbers:"<< endl;
for (i = 0; i<k; i++)
{
for (j = 0; j<k; j++)
{
cout << "[ " << i + 1 << " , " << j + 1 << " ] = ";
cin >> a[i*j];
}
cout << endl;
}
for (i = 0; i<k; i++)
{
for (j = 0; j<k; j++)
{
sum += a[j];
}
b[i] = sum;
cout << b[i];
sum = 0;
}
return 0;
}