Hirdetés
Új hozzászólás Aktív témák
-
Dirty_Pio
csendes tag
Na megint van egy kerdesem. Egy matrixot probalok beolvasni de azt a hibauzenetet kapom, hogy max1 was not declared in this scope. Az ha jol tudom valami oylasmit jelent hogy a fuggveny nem tudja ahsznalni mert kivul esik a hataskoren.
#include <stdio.h>
#include <stdlib.h>
#define ROW 4
#define COL 5
int readnr (void)
{
int i=0;
char x[5],c;
while ( ((c=getchar()) != '\n') && (i<5))
{
x[i]=c;
i++;
}
if (x[i-1]=='\n') x[i-1]='\0';
else x[i]='\0';
i = atoi(x);
return i;
}
void mread (int max1, int max2, int q[max1][pmax2])
{
int i,j;
for (i=0; i<=max1;i++)
for (j=0; j<=max2; j++)
q[i][j]=readnr;
}
printm (int max1, int max2, int q[max1][pmax2])
{
int i,j;
for (i=0; i<=max1;i++)
{
for (j=0; j<=max2; j++)
printf("%4i ",q[i][j];
printf("\n");
}
}
int main (void)
{
int max1=ROW,max2=COL;
int a[ROW][COL];
mread(max1,max2,a);
printm(max1,max2,a);
system("pasue");
return(0);
}
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- Dell XPS 9380, 13,3" UHD/4K Touch, I7-8665U CPU, 16GB DDR4, 256GB-1TB SSD, W11, Számla, 1 év garanci
- Dell XPS 9380, 13,3" UHD/4K Touch, I7-8665U CPU, 16GB DDR4, 256GB-1TB SSD, Új akku, W11, Számla, 1 é
- Eladó Konfig I7 13700K 32GB DDR5 1TB SSD RX6800XT 16GB!
- Erős gamer / workstation PC RTX 5070 Ti, 64GB RAM, Ryzen 9
- Dell Latitude 7340 2-in-1 i5 13.gen, 16GB DDR5, 512GB SSD, QHD+ érintőkijelző, ÚJ ÁLLAPOT!
- Használt iPhone 14 felvásárlás gyors, korrekt, biztonságos
- Samsung Galaxy A56 5G, Kártyafüggetlen, 1 Év Garanciával
- MSI 14 Modern C12M FHD IPS i7-1255U 10mag 16GB 512GB SSD Intel Iris XE Graphics Win11 Garancia
- Dell Latitude 5430 14" Touchscreen i5-1235U 16GB 512GB 1 év garancia
- Bomba ár! Lenovo ThinkPad T450s - i5-5GEN I 8GB I 256GB SSD I 14" HD+ I Cam I W10 I Garancia!
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: Laptopműhely Bt.
Város: Budapest


