* What's wrong with vector<>::at(int) ?
@ 2001-10-29 3:40 Andrew Guts
0 siblings, 0 replies; only message in thread
From: Andrew Guts @ 2001-10-29 3:40 UTC (permalink / raw)
To: gcc-help
Such code was compiled well with VC++. What's wrong for gcc ?
class Item {};
class My {
protected:
vector <Item> item;
...
public:
...
const Item& getitem(int i) const { return item.at(i); }
}
d.cpp: In method `const class ::d::cField & ::d::My::getitem(int)
const':
d.cpp:791: no matching function for call to
`vector<::d::Item,allocator<::d::Item> >
::at (int &) const'
Thanks
Andrew
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-10-29 3:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-29 3:40 What's wrong with vector<>::at(int) ? Andrew Guts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).