0

In the WHODUNIT problem set in week 3 it says:

"Open up bmp.h, and you’ll see actual definitions of those headers we’ve mentioned, adapted from Microsoft’s own implementations thereof. In addition, that file defines BYTE, DWORD, LONG, and WORD, data types normally found in the world of Windows programming. Notice how they’re just aliases for primitives with which you are (hopefully) already familiar"

I'm not familiar with what he just said. Can anyone offer clarification on what he is talking about?

0

Data types in C++ are mainly divided into two types:

  1. Primitive Data Types: These data types are built-in or predefined data types and can be used directly by the user to declare variables. example: int, char , float, bool etc.

Primitive data types available in C++ are: Integer; Character; Boolean; Floating Point; Double Floating Point; Valueless or Void; Wide Character.

  1. Abstract or user defined data type: These data types are defined by user itself. Like, defining a class in C++ or a structure.

Thus file “bmp.h” in itself contains defined Structures (or abstractions) over declared variables that are indeed needed to implement further program.

Hope that made sense and solved your question.

4
  • Is it the same in C, as CS50 just teaches C – Ryan Hinchliffe Aug 7 '19 at 21:58
  • Yes, it is basically the data types that are being used in C throughout the CS50 course and therein in the C language itself. A primitive example would be initializing integer A value to 3: int A = 3; – ISOPARM Aug 8 '19 at 6:27
  • So a primitive are just pre-defined or built in data types. For declaring variables e.g. "char hey;" or "int numbers;" – Ryan Hinchliffe Aug 8 '19 at 10:52
  • Built in. First you declare a type - int, for example; next you name it and assign it value- int number = 3; – ISOPARM Aug 8 '19 at 18:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .