help with adding in a sort or search option

hey guys im not sure how to do a search option that will sort these into male, female, or child, then group them into the main body groups like (bust, chest, underbust, and back) im still new at c programming and if yall could help me that would be awsome thanks in advanced

#include <stdio.h>
#include <string.h>

struct clientData {
unsigned int acctNum;
char lastName[ 15 ];
char firstName[ 10 ];
double balance;
};

int main (void)
{

unsigned int i;

struct clientData blankClient = { 0, "", "", 0.0 };

FILE *cfPtr;

if ( ( cfPtr = fopen( "client.dat", "wb" ) ) == NULL ) {
puts( "file could not be opened." );
}
else{
for ( i = 1; i <= 100; ++i ) {
fwrite( &blankClient, sizeof( struct clientData ), 1, cfPtr );
}

fclose ( cfPtr );
}


char *Items[] = {"\nBust", "\nWaist", "\nHips", "\nBack Width", "\nFront Chest", "\nShoulder", "\nNeck Size", "\nSleeve", "\nUnder Bust", "\nWrist", "\nUpper Arm", "\nCalf", "\nAnkle", "\nNape To Waist", "\nWaist To Hip", "\nFront Shoulder To Waist", "\nOutside Leg", "\nInside Leg" };
int sizes[] = {0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,0.00, 0.00, 0.00, 0.00, 0.00, 0.00 };
char askthem[] = {"Please enter the appropriate values in inches for each item"};
char tellthem[] = {"here is what you put"};
char *erorfound = {"You have entered a value that is inappropriate"};

printf("%s", askthem);
for (int i = 0; i < 18; ++i)
{
printf("%s : ", Items[i]);
scanf("%f", &sizes[i]);
}


}
Last edited on
Topic archived. No new replies allowed.