バナーをクリックすれば目次に戻ります
Copyright 1999 Rogue Wave Software
Copyright 1999 Sun Microsystems, Inc.
RWTPtrVector<T>
#include <rw/tpvector.h> RWTPtrVector<T> vec;
クラス T はどんな型でも構いません。
同形
#include <rw/tpvector.h>
#include <rw/rwdate.h>
#include <rw/rstream.h>
main() {
RWTPtrVector<RWDate> week(7);
RWDate begin; // 今日の日付
for (int i=0; i<7; i++)
week[i] = new RWDate(begin++);
for (i=0; i<7; i++)
{
cout << *week[i] << endl;
delete week[i];
}
return 0;
}
|
March 16, 1996 March 17, 1996 March 18, 1996 March 19, 1996 March 20, 1996 March 21, 1996 March 22, 1996 |
RWTPtrVector<T>();
RWTPtrVector<T>(size_t n);
RWTPtrVector<T>(size_t n, T* ival);
RWTPtrVector<T>(const RWTPtrVector& v);
RWTPtrVector<T>& operator=(const RWTPtrVector<T>& v);
RWTPtrVector<T>& operator=(T* p);
T*& operator()(size_t i); T* operator()(size_t i) const;
T*& operator[](size_t i); T* operator[](size_t i) const;
T* const * data() const;
size_t length() const;
void reshape(size_t N);
void resize(size_t N);
