Can someone help me with some c++?
>>15333890
if you keep asking questions about asking questions its going to take forever. also your probably on the wrong board?
>>15333890
c++ is a meme language, use haskell instead
Ok so i have to solve this:
7
- - - - - - -
- + - - - - -
- - + - - - +
- - - - + - -
- - - - - - -
- - - - + - -
- - - - - - -
and i have to count how many different rectengulars with minuses are there.
So for this i need output to look like this:
size 1x1 : 44
size 2x2: 19
size 3x3: 5
size 4x4: 1
i have something like this now:
#include <iostream>
#include <fstream>
using namespace std;
void largestMatrix(char **matrix, int n);
int minimum(int a, int b, int c);
void printMatrix(char **matrix, int n);
void dealocateMatrix(char **matrix, int n);
int main()
{
ifstream file;
int matrixSize = 0;
file.open("teritorij1.txt");
file >> matrixSize;
cout << "Zadana matrica velicine " << matrixSize << endl;
cout << endl;
char **matrix = new char*[matrixSize];
for(int i = 0; i < matrixSize; i++)
*(matrix + i) = new char[matrixSize];
for(int i = 0; i < matrixSize; i++)
{
for(int j = 0; j < matrixSize; j++)
{
file >> matrix[i][j];
}
}
file.close();
// printMatrix(matrix, matrixSize);
//largestMatrix(matrix, matrixSize);
//dealocateMatrix(matrix, matrixSize);
return 0;
}