"pkirk25" <pknews@kirks.netwrote in message
news:1161697372.080312.194890@h48g2000cwc.googlegr oups.com...
Quote:
It looks like the Visuakl Studio Intellisense can see the various
functions but its compiler cannot. I am well out of my depth with this
error message.
>
report.obj : error LNK2019: unresolved external symbol "private: class
std::vector<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char,class
std::allocator<class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char __thiscall
Table::v3_snapshot(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char)"
(?v3_snapshot@Table@@AAE?AV?$vector@V?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V? $allocator@V?$basic_string@DU?$char_traits@D@std@@ V?$allocator@D@2@@std@@@2@@std@@V?$basic_string@DU ?$char_traits@D@std@@V?$allocator@D@2@@3@@Z)
referenced in function "public: class std::vector<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char,class std::allocator<class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char __thiscall Table::snapshot(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char)"
(?snapshot@Table@@QAE?AV?$vector@V?$basic_string@D U?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$al locator@V?$basic_string@DU?$char_traits@D@std@@V?$ allocator@D@2@@std@@@2@@std@@V?$basic_string@DU?$c har_traits@D@std@@V?$allocator@D@2@@3@@Z)
>
//tables.h
public:
Table(string db_file);
vector<stringrealm_list();
vector<stringsnapshot(string realm);
int get_item_median(string item_code);
int get_item_snap(string item_code);
private:
bool isLoaded;
int version_number;
string get_realm_name(string); // return realm name if one is found
in string
vector<stringv4_snapshot(string realm);
vector<stringv3_snapshot(string realm);
Here you promise to the compiler that there exists
somewhere the definition of a function named
'Table::v3_snapshot()'. Did you provide one?
Quote:
>
//tables.cpp
...
#include "tables.h"
...
vector<stringTable::snapshot(string realm)
This signature states that this function will return
an object of type 'vector<string>'
Quote:
{
vector<stringsnapshot;
if (4 == version_number)
{
snapshot = this->v4_snapshot(realm);
'snapshot()' is a function. Why are you trying to assign
something to it?
Quote:
}
else
{
snapshot = this->v3_snapshot(realm);
}
>
return snapshot;
Why are you trying to return a type other than what
the function is defined to return?
-Mike