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
Vector of classes
Vector of classes
Nov 29, 2009 at 4:58am UTC
closed account (
Sy0XoG1T
)
I decided to leave arrays behind and get into vectors. They seem pretty simple so far but I'm having trouble understanding how to create a vector of classes.
Like how an int would be vector<int> test(20);
How would I create a vector for this class?
class _dot
{
float x, y;
};
Nov 29, 2009 at 5:14am UTC
jsmith
(5804)
vector<_dot> v;
Nov 29, 2009 at 6:37am UTC
closed account (
Sy0XoG1T
)
Now it works... I tried that before and I got complaints from my compiler. -_-
Thank you.
Topic archived. No new replies allowed.