I think everything is an object in c++
By the letter of the standard, an "object" is "a region of storage". You can read the nitty-gritty details under [intro.object]
.
But in layman's terms yes you are right.
like (int, float) are scalar objects..etc.
Absolutely. An int
is an object. A float
is an object.
(Of course, int
and float
themselves are types.)
But when we create class's instance, documentation refers the "initialize an object with constructor" in c++.
There's nothing wrong with that. You can initialise an int
, and you can initialise a float
, and you can initialise an object of class type. For the latter case, one way to do that is using a constructor. That doesn't change anything.
What does it actually means.
Exactly what it says: performing the steps needed to give some object an initial value.
I'll caution you also that there is a lot of bad "documentation" (notably poor tutorials etc.) for C++ out there on the web, so it's also possible that you came across badly-worded or flat-out incorrect text. Notice that, even in the comments section under your question, some people got this wrong.