#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
void fun(char,int);
int main()
{
srand(time(NULL));
char haslo[6][2];
for (int j=0; j<2; j++)
{
for (int i=0; i<6; i++)
{
if (i<3)
haslo[i][j] = rand()%25 + 1 + 'a';
else
haslo[i][j] = rand()%14 + 1 + '!';
}
}
fun(haslo, 6);
system("pause");
return 0;
}
void fun(char t[][2],int a)
{
for (int j=0; j<2; j++)
{
for (int i=0; i<a; i++)
{
cout << t[i][j];
}
}
}
Czesc
Wiecie może na czym polegają moje błedy i jak je mam naprawić? Z góry dzięki. Oto one:
|21|error: invalid conversion from 'char (*)[2]' to 'char' [-fpermissive]|
|5|note: initializing argument 1 of 'void fun(char, int)'|