Hi, I have a text file with a list that reads like this: Last name, First name, Grade with the names being strings and the grades being integers. I need to put this list into a structure so that I...
Type: Posts; User: Raen
Hi, I have a text file with a list that reads like this: Last name, First name, Grade with the names being strings and the grades being integers. I need to put this list into a structure so that I...
That worked! Thank you so much! The exact error message had been "(.text+0x7b): Undefined reference to 'tan'."
For future reference, what does the -lm do? When is it necessary to use it?
Hi. My teacher has given my class this assignment:
I wrote this code (sorry about the weird tabbing, xming wouldn't let me copy so I had to take it from notepad):
#include <stdio.h>...
Hi. Our C professor gave us the following problem:
I wrote a code I think will work, but for some reason Putty and TeraTerm are both hating my computer tonight so I can't try it. I'll have...
rags_to_riches, here's my entire code:
#include <stdio.h>
#include <stdlib.h>
main() {
FILE *fp1, *fp2, *fp3;
char str[80];
Would
fprintf(fp1, "%s\n", str);
be correct?
I'm still not getting it to work. When I try to compile, I get the error "warning: passing argument 1 of fprintf from incompatible pointer type" for the lines which read
fprintf("%s\n", str);
...
Would it be
while(fscanf(fp3, "%s", array[i])!=NULL) {
i++;
}
?
Sorry if I seem completely clueless, I really don't understand most of what our professor does so a lot of my programming...
Oh, thank you, I didn't notice that. Were there any other glaring errors?
I also think I came up with a way to write the file to an array, since I didn't understand the strtok explanations I...
Hi, I'm very new to programming and am taking an entry-level course in C. One of the homework problems we have is to take two text files, merge them into a third file, and sort the file...