Science, asked by Grandsato984, 1 year ago

How do you define a pointer to object in c++?

Answers

Answered by nms
2
class_name * pointer_name , object_name ;
pointer_name = &object_name;


pls mark it as brainliest.
Answered by Anonymous
0
hey there!!

◆ pointer are memory allocation variables ..

=) we define a pointer by giving astrick before the variable name with its data type..

for example :--

..............
............

{
int *p ;

*p = &a
............
...........

here ( *p indicates the pointer to the variable p )

general form :-

data type_* variable name ;

hope u got my words how to declare or define pointers..

___________. ______________
Similar questions