Question
Hi, can someone add command-line arguments for debugging? My code is working I just need to incorporate debug mode. Here is my program: #include #includerecord.h
Hi, can someone add command-line arguments for debugging? My code is working I just need to incorporate debug mode.
Here is my program:
#include
#include"record.h"
#include"database.h"
void getaddress (char s[], int a){}
void menu()
{
printf(" Greetings, what do you want to do with the database? ");
printf("------------------------------------------------------------------------ ");
printf(" 1. add ");
printf(" 2. printall ");
printf(" 3. find ");
printf(" 4. delete ");
printf(" 5. quit ");
}
int main(int argc, char *argv[])
{
struct record * start = NULL;
int tempaccNum;
int accNum = 0;
char name[25];
char inputAddress[50];
int menus;
do { menu(); printf("Enter your choice: "); scanf("%d", &menus); printf(" "); /* Accepts data for new customer */ if (menus == 1) { printf(" Enter account number: "); scanf("%d", &accNum); printf(" Enter name: "); scanf("%s", name); printf(" Enter mailing address( press ';' to end input): "); scanf("%[^;]%*c", inputAddress); getaddress(start->address, accNum); } /* printing records in the database */ else if (menus == 2) { printAllRecords(start); } /* Accepts account number to search */ else if (menus == 3) { printf(" Enter account number to search: "); scanf("%d", &tempaccNum); findRecord(start, tempaccNum); } /* Accepts account number to delete */ else if (menus == 4) { printf("Enter account number to delete: "); scanf("%d", &tempaccNum); deleteRecord(&start, tempaccNum); } /* quit the program */ } while (menus != 5);
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started