I have the following code which shows roughly what i am trying to do, I want to write error messages to the file using the write system call. I am having trouble assigning error messages to the...
Type: Posts; User: trixxma
I have the following code which shows roughly what i am trying to do, I want to write error messages to the file using the write system call. I am having trouble assigning error messages to the...
hey I would like to delete all occurances of .o from a directory, the code below is able to delete any files that if the name ends with o for example if i hardcode hello.o it will be able to be...
Thanks very much citizen you solved my problem :) and thank you everyone else for your help and advice also
I have updated the code to bool like you said and return check but the loop still does not break.
bool checkDate(Student data[], int count)
{
int monthLength[13] = {0, 31, 28, 31, 30, 31,...
I have created two functions one to test if a year is a leap year and another to test for a valid day and month and the code works perfectly. But im having a problem if the date is wrong I want the...
I have the following code, it compiles but when I run it it prints Adding Student Information but after a minute or so it says killed. I would like to know what i did wrong?
...
This is what I have so far
#include<stdio.h>
#define numRows 10 /* number of rows */
float payCalculation(struct staff staff[numRows]);
The only problem with structures is that I havent learnt them yet
I know how to set one up
struct Person {
char name[20];
float pay[20];
float hrs [20];
};
Person person[10];
I have an array of strings, which allow a user to enter a name for the staff member, the amount they get paid and the hours they have worked. I want to multiply the pay by the hours (pay * hours, eg....
tama00 - the problem with your code it has a warning (warning: format '%s' expects type 'char *', but argument 2 has type 'char (*) [39u]' and my program can not have any warnings.
dwks - how...
I have updated my code with more detail and code tags.
Also I was thinking could I scan each input for example
printf("please enter person's name");
scanf("%s", &a);
printf("please enter...
I have an array called person (person[10][4]) and I want to allow users to enter person information. The person array is char. I am confused about the scan part and Im not sure how to put the user...