1
vote
Accepted
Changing file header- Invalid or unsupported format
I'd like to see what came before this code. Before you did the freads to load the new headers, did you reset the file pointer to the beginning of the file? If not, then it isn't reading the headers. ...
1
vote
Accepted
Why do we write #include "structs.h"?
This is not true, we can use structures without using that header file. It is possible that your source code specifically needs that file, but not in general.
If we write:
#include "structs.h"
Means ...
1
vote
Accepted
Pset4 Resize Horizontal Not Working
I'm a little hesitant to offer any advice because I'm not so excellent at this stuff myself, but you're already making mistakes in your new header data calculations - that's certainly whats indicated ...
1
vote
Accepted
How to get list of function signatures from header files
It is difficult to respond in a simple way, without going into great depths we can find very good documentation in man pages: We can find documentation of the standard head files by typing in the ...
1
vote
Accepted
Issue with creation of new header files in pset4
You'd have to copy the other fields from bi to bi_new. Easiest way is to initialize bi_new using
BITMAPINFOHEADER bi_new = bi;
which copies the whole structure, you'd still have to change the fields ...
1
vote
Problem with outfile's header
Maybe you should initialize bf_resize and bi_resize to copies of bf and bi (they should be the same except for four size-related fields), using for example
BITMAPFILEHEADER bf_resize = bf;
...
1
vote
How do I share a variable between source files in C with extern?
the answer is wrong, please change it. see below for the correct file1.c from the really long answer:
#include "file3.h" /* Declaration made available here */
#include "prog1.h" /* Function ...
Only top scored, non community-wiki answers of a minimum length are eligible