0
In desperate need of help, I canât figure this out
I canât figure out how to do this: can anyone help? Write a C++ program where the user has to to enter integers as inputs to be stored in the variables 'a' and 'b' respectively. There are also two integer pointers named ptrA and ptrB. Assign the values of 'a' and 'b' to ptrA and ptrB respectively, and display them.
2 Answers
+ 2
Well it's a basic one :-
int a, b;
cin >> a >> b;
int *ptrA, *ptrB;
ptrA = &a;
ptrB = &b;
cout << *ptrA << ptrB;
+ 1
thank you Harshit!!!