Post all of your code in [CODE ] tags in the future, otherwise we will not read it (see the "CODE" button in "Advanced view" when you post). (Your only warning from me!)
Quote:
o Employee Status (F or P)
This one is pretty vague, but we can assume its a char. You have used char[2], but you dont need it to be an array, just use "char" without the array.
Quote:
o Hint: Create a employee array of type “employee”
Similar to how you create a char array, it tells you you have to create an array of struct employee, size of the array is 50.
Quote:
• Randomly fill the salary and status values for all employees (using looping)
So for each of the 3 fields you have to create random numbers. See http://faq.cprogramming.com/cgi-bin/...&id=1043284385. Part of that article contains a custom function "GetRand" or whatever. If you use it word-for-word in your assignment, I imagine you should either state you have done so, or at least fully understand what its doing. Otherwise look for basic c++ random number examples online, it is very easy to find and also easy to use.
When you generate the random numbers you will give a minimum and maximum value. You are also told what these min and max values are. For example:
Quote:
o Employee Salary (2500 to 3500)
So you need to generate a random number from 2500 to 3500 and store it in that field.
Quote:
• Ask user to enter a number between 0 to 49, say X
• Print the employee X’s information
Read a number from the user (also a FAQ for this on this website), using scanf. Then use basic printfs to print the employee.
When you try this out, post your code or any errors you get so we can help. If you dont understand, explain exactly what the problem is.