FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


C++ What r these errors





umeshtangnu
i wanted to test how the palindrome program works with a stack/queue setup and the website i found that lists each file and such i simply copy/paste into visual studio and when i try to run it i get these errors

please help with what they are

1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall QueType::~QueType(void)" (??1QueType@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall QueType:equeue(char &)" (?Dequeue@QueType@@QAEXAAD@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QueType::IsEmpty(void)const " (?IsEmpty@QueType@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall QueType::Enqueue(char)" (?Enqueue@QueType@@QAEXD@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall QueType::QueType(int)" (??0QueType@@QAE@H@Z) referenced in function _main
1

here it the queue file which is where these errors appear to be originating

class FullQueue
{};

class EmptyQueue
{};

typedef char ItemType;
class QueType
{
public:
QueType();
// Class constructor.
// Because there is a default constructor, the precondition
// that the queue has been initialized is omitted.
QueType(int max);
// Parameterized class constructor.
~QueType();
// Class destructor.
void MakeEmpty();
// Function: Initializes the queue to an empty state.
// Post: Queue is empty.
bool IsEmpty() const;
// Function: Determines whether the queue is empty.
// Post: Function value = (queue is empty)
bool IsFull() const;
// Function: Determines whether the queue is full.
// Post: Function value = (queue is full)
void Enqueue(ItemType newItem);
// Function: Adds newItem to the rear of the queue.
// Post: If (queue is full) FullQueue exception is thrown
// else newItem is at rear of queue.
void Dequeue(ItemType& item);
// Function: Removes front item from the queue and returns it in item.
// Post: If (queue is empty) EmptyQueue exception is thrown
// and item is undefined
// else front element has been removed from queue and
// item is a copy of removed element.
private:
int front;
int rear;
ItemType* items;
int maxQue;
};
Indi
"Unresolved external symbol" errors mean that definition of a variable or function that was used somewhere was not found. Remember that for a function:
Code:
int foo();
is the declaration, and:
Code:
int foo()
{
   // Code for the function
}
is the definition.

You have declared all those functions in class QueType, but have you defined them? Or, to put it another way, when you copy-pasted, are you sure you got all of it?
Related topics
[php scripts ] phpweather&email
50 years ago (*explicit*)
Creating a new Operating System
Latest PHP install may cause phpBB to return errors...
uma grande dúvida em php, por favor me ajudem
Warnings and errors...
Using SharpDevelop
winsit.exe
Voting: My ideal solution.
Help Pleasee, My Submit form dont submit on google chrome
All Truth Is Subject To Individual Perception
History of domain names
Say Good Bye to pi
Sin, original sin, devil;Fantasy or real?
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.