[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Can someone help me with some c++?

This is a red board which means that it's strictly for adults (Not Safe For Work content only). If you see any illegal content, please report it.

Thread replies: 5
Thread images: 1

File: 1488181150555.jpg (23KB, 478x344px) Image search: [Google]
1488181150555.jpg
23KB, 478x344px
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;
}
Thread posts: 5
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.