cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Initialisation of Const int *
Initialisation of Const int *
Feb 22, 2012 at 10:33am UTC
Smoke
(30)
How do I initialise const int* with data?
Last edited on
Feb 22, 2012 at 10:33am UTC
Feb 22, 2012 at 10:43am UTC
hamsterman
(4538)
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.