I am unable to get "reference to a pointer".
Here:
char*p = "hello";
char*&k = p;
while creating reference to a pointer why we have to write *&k , why not &*k?
Printable View
I am unable to get "reference to a pointer".
Here:
char*p = "hello";
char*&k = p;
while creating reference to a pointer why we have to write *&k , why not &*k?
I recommend you:
- Change your code writing style to use spaces like
Code:char* p = "hello";
char*& k = p;
- Use Code tags while posting code snippets.
Now about your question:Code:char a; // character a
char* p; // p is a pointer to a character
char& r; // r is a reference to a character
char*& rp; // r is a reference to a pointer to a character
char&* pr; // r would be a pointer to a reference to a character
ok Thanks...
How to create a new thread , PLEASE HELP ME!!!
#include <stdio.h>
void main()
{
int x = 10 ;
3 = x;
}
When we run the above program compiler error :"left operand must be l-value" occur , why it's telling about left operand while in the
program 3 is on RHS... ????
1. Return to the list of threads in C++ (Non Visual C++ Issues) forum.Quote:
Originally Posted by Tanushreeagr
2. Access the Post New Thread page through the button-like link.
You are mistaken: 3 is on the left hand side.Quote:
Originally Posted by Tanushreeagr