Im working on an assignment where the user can enter some inputs via a struct pointer and display them. My problem is when I hit option 3 (lines 94 to 102) to display all records, the strings from the struct are not displayed. instead, blanks appear where the strings are supposed to. the float values display just fine. How come it displays the numeric variables, but not the string?
employeeRec *p, records[max];
I suspect you wanted records to be an array of employeeRec objects but, since you've declared it on the same line as p, employeeRec is actually an array of pointers to employeeRec.
Also the C-style array collapses to a pointer you don't need two separate variables, p and records, to practice pointer arithmetic. you can use the name of the array as the pointer.
Finally you are allocating additional memory than you might actually need, so it'd be more efficient to allocate the array dynamically and delete it after use