![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Registered User Join Date: Dec 2008
Posts: 41
| confused by two const decorationg: const vector<Object> const& getdata() Code:
class Log{
private:
string name;
vector<TimePrice> data;
...
public:
vector<TimePrice> const& getdata(){
return data;
}
}
|
| patiobarbecue is offline | |
| | #2 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| I take it what you are looking for is: const vector<TimePrice>& getdata() const
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
![]() |
| Tags |
| const, return reference |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Function template has already been defined | Elysia | C++ Programming | 19 | 04-14-2009 10:17 AM |
| The so annoying LNK2005... please help! | Mikey_S | C++ Programming | 14 | 02-01-2009 04:22 AM |
| Undefined Reference Compiling Error | AlakaAlaki | C++ Programming | 1 | 06-27-2008 11:45 AM |
| Including lib in a lib | bibiteinfo | C++ Programming | 0 | 02-07-2006 02:28 PM |
| oh me oh my hash maps up the wazoo | DarkDays | C++ Programming | 5 | 11-30-2001 12:54 PM |