Я работаю над проектом, и я пытаюсь передать структуру функции, и я пробовал разные способы, но я все еще не знаю. Im получение сообщения об ошибке:Передача структуры функции Visual Studio
незаконное использование этого вида выражения.
Поблагодарите за помощь.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
struct big{
int day;
int year;
char month[10];
} ;
void gen(struct big);
void main()
{
int choice;
printf("\t\t\t\t\t*MENU*\n\n\n");
printf("\t\tGenerate Buying/Selling Price-------------------PRESS 1\n\n");
printf("\t\tDisplay Foreign Exchange Summary----------------PRESS 2\n\n");
printf("\t\tBuy Foreign Exchange----------------------------PRESS 3\n\n");
printf("\t\tSell Foreign Exchange---------------------------PRESS 4\n\n");
printf("\t\tExit--------------------------------------------PRESS 5\n\n\n\n");
printf("\t\tPlease enter your choice");
scanf("%d", &choice);
if (choice == 1)
{
gen(big);
}
system("pause");
}
void gen(big rec)
{
printf("Enter the date in the format: 01-Jan-1993");
scanf("%d %s %d", &rec.day, &rec.month, &rec.year);
}
'void main' - это неопределенное поведение. – chris