Is this possible? For example if i write
Car myCar;
Then the constructor taking no arguments of Car is called. It results in an error if there is only a constructor taking arguments.
In Java I can easily declare an object and create it later using the exact same statement as above.
No, this is not possible. You could come up with some dirty hacks based on placement new which may get you close, but I doubt you are interested in them.
Why do you want to do that? Perhaps there is some clean way how to achieve that in a C++ style.
If you only want to create a variable which will point to some object later, this is what pointers are used for in C++.
Or “old way”:
To find an item in a vector a code like this is commonly used:
In many situations you would probably also prefer not to have a vector of cars, but of pointers to cars as well.