rendered paste body#include <fstream>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
fstream fs("file.txt");
int columns1 = 0; // cols in matrix 1
int rows1 = 0; // rows in matrix 1
int columns2 = 0; // cols in matrix 2
int rows2 = 0; // rows in matrix 2
string s;
getline(fs, s);
columns1 = count(s.begin(), s.end(), ' ') + 1;
do
{
getline(fs, s);
++rows1;
} while(s != "************");
getline(fs, s);
columns2 = count(s.begin(), s.end(), ' ') + 1;
++rows2;
while(!fs.eof())
{
getline(fs, s);
++rows2;
}
}