Need to get some information from the user.
#include <stdio.h> #include <stdlib.h> #include <windows.h> int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); printf("ΠΠ²Π΅Π΄ΠΈΡΠ΅: Π’Π΅ΠΊΡΡ, \n"); int index[]; char user[]; char name[]; int i=0; while(scanf("%s,%d,%s",&name,&index,&user)==1) { scanf("%s %d %s",name[i], index[i], user[i]); i++; } } But the compiler gives an error
error: array size missing in For some reason, requires explicitly specify the size. As I understand it, it is better to store this data in a structure, but only one array seems to be allowed there without specifying its size.
scanf("%s,%d,%s",&name,&index,&user)followed by suddenlyscanf("%s %d %s",name[i], index[i], user[i]). What is there in general mean? - AnT September{int index; char user[USER_MAX]; name[NAME_MAX]; }{int index; char user[USER_MAX]; name[NAME_MAX]; }{int index; char user[USER_MAX]; name[NAME_MAX]; }- PinkTux 4:41 pm