Search:
Forum
General C++ Programming
Problem to load a vector by using a poin
Problem to load a vector by using a pointer (C++)
Jan 18, 2010 at 9:46am UTC
MatsCarlsson
(1)
Hi!
I have a problem that I would be wery greateful if someone could help me with.
The problem is that I need a pointer to load my vector. Somewhere I do something wrong. The code I have written today look like this:
vector <string>storage;
vector <string>*ptrStorage;
ptrStorage=&storage;
ptrStorage.push_back("hi");
Best regards
Mats
Jan 18, 2010 at 11:17am UTC
somshekhar
(33)
Use Pointer Instead of dot.
ptrStorage->push_back("hi");
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs