#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct account {
char AccName[20];
int Age;
double AccBalance;
struct account *Next;
};
typedef struct account BankAcc;
void insert(struct account **headOfList, char *name, int age, double balance);
int Delete(struct account **headOfList, char *name );
...
User Profile
Collapse
-
void insert(struct account **headOfList, char *name, int age, double balance) {
struct account *newPtr;
struct account *previousPtr;
struct account *currentPtr;
newPtr = (account*) malloc(sizeof(a ccount));
if(newPtr != NULL) {
newPtr->AccName = (char *)malloc(40 * sizeof(char));
newPtr->AccName = name;
newPtr->Age = age;
newPtr->AccBalance... -
problem: string in struct
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct account {
char *AccName;
int Age;
double AccBalance;
struct account *Next;
};
typedef struct account BankAcc;
void insert(struct account **headOfList, char *name, int age, double balance);
//int delete(struct account **headOfList, char *name );
void...
No activity results to display
Show More
Leave a comment: