Skip to main content
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. ...
Cliff B's user avatar
  • 69k
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 ...
MARS's user avatar
  • 5,169
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 ...
ItsAnApe's user avatar
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 ...
MARS's user avatar
  • 5,169
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 ...
Blauelf's user avatar
  • 21k
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; ...
Blauelf's user avatar
  • 21k
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 ...
mahesh's user avatar
  • 110

Only top scored, non community-wiki answers of a minimum length are eligible