Questions tagged [structs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
133 views

Can I create an element of arbitrary size in a STRUCT?

I'm working on recover.c. It seems like a tidy solution to eliminate fseek calls would be to create a struct like the following: typedef struct { BYTE first; BYTE second; BYTE third; ...
5
votes
1answer
967 views

Pset5: Misunderstanding tries and method to assign letter to an array inside a struct

Before posting, I've searched a lot here and there on the Internet to find the answers to my questions myself and I did code something that eventually works. My issue is that I've re-rewrote some ...
2
votes
2answers
338 views

Pset4: How does fread add properly to the struct?

In Problem Set 4 we're given the copy.c and bmp.h files. On line 47 the fread() function is called with the arguments, &bf, sizeof(BITMAPFILEHEADER), 1, and inptr. I understand what each of these ...
0
votes
1answer
242 views

check50 claiming pairs are sorted incorrectly

On Problem Set 3, check50 has flagged my program as not having sorted the pairs correctly. However, the pairs array appears to be sorted in every case I've tried. I used insertion sort and had ...