I'm doing a school project in language C, i have to do a software for a library. i created a function that allows the user to add a book in the library and in this function I call another one that is supposed to allow the user to create the code of the book. The book and the code are structs. My problem is that the code is well executed until the return of the addcode function and then the console says : "Process finished with exit code -1073741819 (0xC0000005)". Here is the code :
code_livre code1;
printf("Theme de livre\n");
gets(code1.theme);
printf("numero du livre\n");
scanf("%d",&code1.numero);
printf("test 2");
return code1;}
I don't know where is the problem and I'll appreciate any help to find out where i was wrong
User contributions licensed under CC BY-SA 3.0