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
Problem with pointers to objects
Problem with pointers to objects
Nov 3, 2014 at 6:15pm UTC
Misbahu
(19)
Please can someone tell what this really is. I mean, is it a pointer to 5 Strings
class
objects in an array or an array of 5 pointers to Strings
class
objects.
Here is the code.
Strings *ptr[5];
And again please can I do this.
Strings *ptr =
new
Strings;
Nov 3, 2014 at 6:37pm UTC
MiiNiPaa
(8886)
Strings *ptr[5];
This is an array of 5 pointers to Strings
Strings *ptr =
new
Strings;
This is pointer to a single object of type Strings
Nov 3, 2014 at 7:59pm UTC
Misbahu
(19)
Okay thanks. Got it
Topic archived. No new replies allowed.