nevermind got it
Type: Posts; User: starvinmarvin
nevermind got it
nevermind i figrued it out....thanks..
i am not really understanding master 5001...could you post code
hey everyone i am getting something like this
Record found at index -1
with some weird characters 45 p 00/3434983984/349834
when i am suppose to...
thanks it got rid of the segmentation fault however now it says
something like
Record found at index -1
with some weird charcters and 42 ...
ok i tried that but now i get a invalid initliazer for char* [256] = "";
wait i forgot i changed it after that
here is where it is declared
int main(int argc, char* argv[])
{
char* ssn = " ";
STUDENT myStudents[SIZE];
char *infile;
int numRecords;
...
int fillArr (FILE *fpinfile_txt, STUDENT* myStudents, int numRecords)
{
int i;
int scanRes;
int stop = 0;
int error = 0;
char fName[MAX];
char lName[MAX];
int grade;
#define MAX 20
#define SIZE 10
// creates a nested structure for student names, birthdates, and social
// security numbers
typedef struct
{
int month;
int date;
int year;
oh and i am not even getting the print statement..."Record found at %d index"
hello i am getting a segmentation fault right after i ask for the social security number in the print statement. i am not sure if the fault is in the search or recsearch function. please someone...
void sortArr(STUDENT student[], int last)
{
int i;
for (i = 0; i < last; i++)
exchangeSmallest (student, i, last);
return;
}
ok ya the prgram runs but when i echo out the first names they arent sorted...it just gives them as they appear in the file that is opened
nevermind it was a forgotten first bracket...i get the first names from the structure but they arent sorted
haha sounds good...lol ok sytax error before the second else
ok i tried this and it gave me a bunch of error messages
here is the module to sort right above this module
/*===================================sortArr=================================*/
void sortArr(STUDENT student[], int last)
{
int i;
...
ok i tried the above comment to put just < and it says john,marsupial,justin,marsupial,marsupial but its not sorted
ya i tried... to put printf("%s", student[smallest].fName); at the end of exchange smallest and it prints out like 2 first names and a last name after that that are all jumbled together...my infile...
ok i have a project due wedsnday i am trying to sort a list of structures...when i run the program i get a segmentation fault..please help
void exchangeSmallest (STUDENT student[], int i, int...
haha hell ya...i didnt put the brackets in the first time..thanks so much man
i cant its due in like 6 hours, so ok i tried to initalize the arr at the beginnin of the count, it didnt work, after the count, and i still get like 30 numbers that are just long numbers.
dude just tell me what i need to write to get it to print the frequency..im tired of working on this
ok i was able to put arr[95] = 0 below where i delcared it and i still get a bunch a crazy numbers.
int generate(int arr[], int num1, int num2, FILE *pFPOut)
{
int linesize = 75;
int numprinted = 0;
int i;
int temp;
printf("The data in test.txt is %d %d.", num1,...