cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
how to put an array to an class pointer
how to put an array to an class pointer variable
Apr 15, 2010 at 8:26am UTC
bobking
(1)
Vector<double>* rhs = new Vector<double>(ndata);
c[]={0,1,2,3,1,2,1,2,1}
(*rhs)=c;
the method is wrong, can you help me?
Apr 15, 2010 at 11:54am UTC
Bazzy
(6281)
Why are you using a pointer to vector?
http://www.cplusplus.com/reference/stl/vector/vector/
1
2
double
c[]={0,1,2,3,1,2,1,2,1}; Vector<
double
> rhs ( c, c +
sizeof
(c) /
sizeof
(
double
) );
Topic archived. No new replies allowed.