I understand how to use the pointer option, but I want to change the actual value without having to use it.
I get compiling issues if I do,
strcat(foo.bar, "string");
Type: Posts; User: ebullient
I understand how to use the pointer option, but I want to change the actual value without having to use it.
I get compiling issues if I do,
strcat(foo.bar, "string");
i want to concatenate a string to a structure passed in the parameter and return the new structure. and it works if i pass it by reference and use pointers,
for example,
typedef struct
{
...
I've been fiddling with it. It's beautiful, but unfamiliar, and neither version work with my program. Here is what I've got so far:
void savePGM(FILE *infile)
{
FILE *outfile;
char...
That's that was super helpful! You really didn't have to do all that :) but I appreciate it a lot.
Right now, I'm having a problem trying to save a file into another file that is going to be named...
I'm writing a program that will read files that will check to see if it's the right type (PGM, type P2), within the max height and width (200 each), max greyscale value, and can later be smoothed...
ah. ok. so i changed it to
int ch;
there wasn't any discernable difference when i ran the program. also, i can't believe how stupid i was not to know how to end it. that's right. but now...
Ah, so I changed it to this and it worked:
if (argc <= 1)
I'm relatively new to programming, so I'm still not sure what I'd use to return a char.
Edit:
I am having trouble compiling. I cannot figure out what is wrong. The program is supposed to read a file (infile) from the command line, then print out which lines have more than 80 characters. If...