You can post it here using wandbox or pastebin, but I can't guarantee that I can help :)
#include <iostream>
#include <fstream>
//including operations.h headerfile which consists addition,subtraction and multiplication function declaration
#include"operations.h"
using namespace std;
//main function
int main()
{
//creating input file stream object
ifstream fin;
//opening matrix.dat file to read data
fin.open("matrix.dat");
//if file does not exists displays no such file and terminates
if(!fin)
{
cout<<"No such file exists";
exit(0);
}
//declaring m1,n1 ---number of rows and columns of matrix a
//m2,n2 ----number of rows and columns of matrix b
int m1,n1,m2,n2;
//declaring 2D array for matrix a and matrix b
int a[10][10],b[10][10];
//reading row and column of first matrix from file "matrix.dat"
fin>>m1;
fin>>n1;
//reading matrix values from file "matrix.dat"
for(int i=0;i<m1;i++)
for(int j=0;j<n1;j++)
fin>>a[i][j];
//reading row and column of second matrix from file "matrix.dat"
fin>>m2;
fin>>n2;
//reading matrix values from file "matrix.dat"
for(int i=0;i<m2;i++)
for(int j=0;j<n2;j++)
fin>>b[i][j];
//displaying matrix a and b
cout<<"Matrix 1 read from file:"<<endl;
for(int i=0;i<m1;i++)
{
for(int j=0;j<n1;j++)
cout<<a[i][j]<<" ";
cout<<endl;
}
cout<<"Matrix 2 read from file:"<<endl;
for(int i=0;i<m2;i++)
{
for(int j=0;j<n2;j++)
cout<<b[i][j]<<" ";
cout<<endl;
}
int ch;
cout<<"What operation do you want to perform?\n1. addition\n2. subtraction\n3. multiplicaiton\n";
cout<<"Enter your choice: ";
cin>>ch;
//You can select operation what you want to perform
switch(ch)
{
case 1: addition(a,b,m1,n1,m2,n2);
break;
case 2: subtraction(a,b,m1,n1,m2,n2);
break;
case 3: multiplication(a,b,m1,n1,m2,n2);
break;
}
return 0;
}