I'm porting a header with this declaration:
struct tMaterialInfo { char strName[255]; // the texture name char strFile [255]; // the texture BYTE color [3]; // the color of the object };
The header has the following includes:
#include <windows.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <fstream> #include <vector> #include <gl\gl.h> // Header File For The OpenGL32 Library #include<gl\glu.h>// Header File For The GLu32 Library #include <gl\glaux.h>
Where does that BYTE come from?
A byte is typically 8 bits. C character data type requires one byte of storage. A file is a sequence of bytes. A size of the file is the number of bytes within the file.
@Ben: The C and C++ standards unambiguously define a "byte" as the size of a char , which is at least 8 bits.
In most computer systems, a byte is a unit of data that is eight binary digits long. A byte is the unit most computers use to represent a character such as a letter, number or typographic symbol. Each byte can hold a string of bits that need to be used in a larger unit for application purposes.
A header file is a file with extension . h which contains C function declarations and macro definitions to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that comes with your compiler.
I'm guessing it's from Windows.
A byte (8 bits).
This type is declared in WinDef.h as follows:
typedef unsigned char BYTE;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With