0

I'm studying the C++ programming language from the book "Programming principles and practice using C++". I'm an absolute beginner and I have a problem with a paragraph in my book because I can't understand what the author means:

A declaration is a statement that gives a name to an object.

A definition is a declaration that sets aside memory for an object.

At the beginning of the chapter the author taught me that a statement that introduces a new name inside a program and that sets aside memory for a variable is called definition.

Can you make an example of declaration and definition?

Lightness Races in Orbit
  • 369,052
  • 73
  • 620
  • 1,021
Piero Borrelli
  • 1,071
  • 2
  • 10
  • 15

0 Answers0