Initialisation of Const int *

How do I initialise const int* with data?
Last edited on
1
2
3
4
5
6
7
8
int i = 5;
const int* p1 = &i;

//or

const int* p2 = new int(7);

//where is the problem? 
Topic archived. No new replies allowed.