//C Prgoramming.. Only can use these three (include)
//I have this problem “warning: this program uses gets(), whichis unsafe.”
// User can add note like “Add your Note: Size 11 and blackcolour”
//Also, the prurshed item is not working and showing allpurshased item if there is more than one
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 3
struct Item
{
char name[100];
int id;
double price;
};
struct ItemOrder
{
char name[100];
int id;
double price;
char note[500];
};
struct ItemOrder*expander(struct ItemOrder ex_arr[],int counter, int id,char *name, double price,char *note)
{
struct ItemOrder *new_arr =(struct ItemOrder*)malloc(sizeof(struct ItemOrder)* (counter + 1));
new_arr[counter].id = id;
strcpy(new_arr[counter].name, name);
strcpy(new_arr[counter].note, note);
new_arr[counter].price = price;
return new_arr;
}
int main()
{
int choice;
struct ItemOrder *itemsOrdered;
int i, counter = 0;
struct Item item[SIZE];
item[0].id = 1;
strcpy(item[0].name, “Football Boot”);
item[0].price =
PayPal Gateway not configured
PayPal Gateway not configured