Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

C++ Potion Store

$
0
0
This assignment is as follows :

CS260 Lab: Shelf Life

Instructions

Your RPG game includes all sorts of valuable items, including different types of potions. Normally players find potions on quests or in random places in the game. However, some players just want to buy potions at a shop. In order to support this you have decided to implement an apothecary shop. The realm will support any number of apothecary shops but each one will be implemented with the same class. These shops are "self-service", non-manned kiosks throughout the realm. Players can walk up to a kiosk and either buy a potion (if there are any there) or submit a potion request. Every once in a while the magician comes by the kiosk and services the potion requests. He (or she) makes the potions from the requests and puts them all on the shelf for future players to buy. (Think of it as Redbox for potions).

Receiving orders

Apothecaries don't get to make any potion they want. Instead, they receive orders for potions. Each order is really a request to make a particular type of potion. Requests are processed in the order that they are recevied. Note, though, that just taking orders is not the same as making potions (see next section).

Making potions

From time to time the magician shows up at a kiosk and makes potions for all of the requests. As each potion is made, it is put on a shelf, at the front. Since it's put at the front of the shelf it pushes all of the other potions back. This means that the most recently made potion is at the front of the shelf.

Buying potions

Players that want to buy potions go to the shop and buy a potion. They cannot select which potion they get, it is just the potion at the front of the shelf.

Capacity limits

Finally, each shop has a size limit for the number of orders they can take (the size of the queue) and the number of potions that they can store on their shelf (the size of the stack). There is no restriction on what these limits are (e.g., one shop may be able to handle only 5 orders while another can store 5000 orders) but once a shop is created, the limits for that shop can't change.

Implementation Requirements

Before understanding the implementation requirements you should look at a couple of files: main.h and main.cpp. The header file contains a simple enumerated type of all of the different potion types that the program supports. It also contains the function prototype for a utility function for priting out the potion type as a string. The main.cpp file contains test code to "run" a shop. This code creates an Apothecary object (with the two limits), issues various order requests, tells the shop to make potions a few times, and buys some potions. If you look at this file you will see the different classes, constructors, and methods that are needed by your program.

The Potion class

The Potion class contains the details about a potion. Your potion class should have a private data member to store the potion type for a created potion. The Potion class needs to have a GetType() method that returns the potion type for a given potion. You also need a default value constructor. You are free to add any other methods that you need.

The Apothecary class

The Apothecary class is where the majority of the work is done. As explained in the overview, each apothecary has different limitations on the number of orders and number of made potions they can store. To support this, the Apothecary class needs to have a constructor that takes in those two values. Next, this class needs to contain a queue for taking orders (order queue) and a stack for holding the completed potions (shelf stack).

In order to take orders, make potions, and allow users to buy potions, the class needs to have these three methods:

bool OrderPotion(PotionType potion);
int MakePotions();
bool BuyPotion(Potion& potion);
The OrderPotion() method takes in a potion type and adds a request for this type of potion to the order queue in the shop. This method needs to make sure that the order queue length limit isn't exceeded. If there is not room to add the request to the queue, the method needs to print a message (see the sample output for the message). The method should return true if the order was successfully added to the queue, false otherwise.

The MakePotions() method reads orders off of the request queue and creates the requested potion. As each potion is made it is put onto the shelf stack. The method returns and integer which is the number of potions made. The method will try to process all of the orders on the request queue. However, MakePotions() needs to be aware of the shelf limit and not make any potions that would put it over the limit. This means that there might be cases where not all of the orders can be processed. In that case there will still be orders left on the queue. Appropriate messages should be printed when potions are made or orders can't be fulfilled. See the sample output.

The BuyPotion() method is the method that is used to take one potion off of the shelf (popping off of the stack). The potion is passed back through a reference parameter. The boolean return value for BuyPotion() is true if a potion was bought and false otherwise.




This is what I have implemented so far and I am getting a host of errors.

main.cpp :

#include <iostream>
#include "apothecary.h"

#ifdef _WIN32
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif

using namespace std;

char* PotionTypeString(PotionType type)
{
	const char* s = "";

	switch (type) {
	case SPEED:
		s =  "Speed";
		break;
	case STRENGTH:
		s =  "Strength";
		break;
	case HEALTH:
		s = "Health";
		break;
	case WISDOM:
		s = "Wisdom";
		break;
	}
	return(s);
}


void BuyPotion(Apothecary& apo)
{
	Potion potion;
	if (apo.BuyPotion(potion)) {
		cout << "Congratulations! You just bought a " << PotionTypeString(potion.GetType()) << " potion!" << endl;
		cout << potion;
	} else {
		cout << "There were no potions available." << endl;
	}
}

void OrderPotion(Apothecary& apo,PotionType type)
{
	bool ret = apo.OrderPotion(type);
	if (ret) {
		cout << "Your potion (" << PotionTypeString(type) << ") has been added to the queue!" << endl;
	} else {
		cout << "The order queue is full." << endl;
	}

}

void MakePotions(Apothecary& apo)
{
	cout << "About to try to make some potions." << endl;
	int count = apo.MakePotions();
	cout << "Made " << count << " potions." << endl;
}

void TestApothecary()
{
	Apothecary apo(5,20);  // order limit, shelf limit

	OrderPotion(apo,WISDOM);
	OrderPotion(apo,WISDOM);
	OrderPotion(apo,SPEED);

	MakePotions(apo);

	OrderPotion(apo,STRENGTH);
	OrderPotion(apo,HEALTH);
	OrderPotion(apo,HEALTH);
	OrderPotion(apo,WISDOM);
	OrderPotion(apo,STRENGTH);
	OrderPotion(apo,HEALTH);

	BuyPotion(apo);
	BuyPotion(apo);
	BuyPotion(apo);
	BuyPotion(apo);

	MakePotions(apo);

	OrderPotion(apo,STRENGTH);
	OrderPotion(apo,STRENGTH);
	OrderPotion(apo,STRENGTH);
	OrderPotion(apo,STRENGTH);
	OrderPotion(apo,STRENGTH);

	MakePotions(apo);

	OrderPotion(apo,HEALTH);
	OrderPotion(apo,WISDOM);
	OrderPotion(apo,HEALTH);
	OrderPotion(apo,WISDOM);
	OrderPotion(apo,SPEED);

	MakePotions(apo);

	OrderPotion(apo,HEALTH);
	OrderPotion(apo,HEALTH);
	OrderPotion(apo,HEALTH);
	OrderPotion(apo,HEALTH);
	OrderPotion(apo,HEALTH);

	MakePotions(apo);

	OrderPotion(apo,HEALTH);
	OrderPotion(apo,WISDOM);
	OrderPotion(apo,HEALTH);
	OrderPotion(apo,WISDOM);
	OrderPotion(apo,SPEED);

	MakePotions(apo);

	BuyPotion(apo);

	MakePotions(apo);

}

int main() {

	TestApothecary();

#ifdef _WIN32
	if (_CrtDumpMemoryLeaks()) {
		cout << "Memory leaks!" << endl;
	}
#endif

	return 0;
}




apothecary.cpp :


#include "apothecary.h"
#include <iostream>
#include <cassert>

using namespace std;

Apothecary::Apothecary():MaxOrders(0), MaxPotions(0), nOrders(0), nPotions(0)
{}

Apothecary::Apothecary(int orders, int potions)
{
	MaxOrders = orders;
	MaxPotions = potions;

	nOrders = 0;
	nPotions = 0;
}

queue::queue()
{
	front = NULL;
	rear = NULL;
}

queue::queue(const queue& aQueue):front(NULL), rear(NULL)
{
	if(aQueue.front == NULL)
	{
		front = rear = NULL;
	}
	else
	{
		//copy first node
		front = new node;
		assert(front != NULL); //check allocation
		front->item = aQueue.front->item;

		//copy the rest of the queue
		node * destNode = front;				//points to the last node in new queue
		node * srcNode = aQueue.front->next;    //points to node in aQueue
		while(srcNode != NULL) //or while (srcNode)
		{
			destNode->next = new node;
			assert(destNode->next != NULL); //check allocation
			destNode = destNode->next;
			destNode->item = srcNode->item;

			srcNode = srcNode->next;
		}
		destNode->next = NULL;

		//set rear pointr
		rear = destNode;
	}
}

const queue& queue::operator= (const queue& aQueue)
{
	if(this == &aQueue)
		return *this;
	else
	{
		//release dynamically allocated memory held by current object
		node * curr = front;
		while(front)
		{
			curr = front->next;
			delete front;
			front = curr;
		}

		//make a deep copy of aQueue
		if(aQueue.front == NULL)
		{
			front = rear = NULL;
		}
		else
		{
			//copy first node
			front = new node;
			assert(front != NULL); //check allocation
			front->item = aQueue.front->item;

			//copy the rest of the queue
			node * destNode = front;				//points to the last node in new queue
			node * srcNode = aQueue.front->next;    //points to node in aQueue
			while(srcNode != NULL) //or while (srcNode)
			{
				destNode->next = new node;
				assert(destNode->next != NULL); //check allocation
				destNode = destNode->next;
				destNode->item = srcNode->item;

				srcNode = srcNode->next;
			}
			destNode->next = NULL;

			//set rear pointr
			rear = destNode;
		}
		return *this;
	}
}

bool queue::enqueue(const Potion& aPotion)
{
	//add to the rear
	node * newNode = new node;
	newNode->item = aPotion;
	newNode->next = NULL;

	if(front == NULL)
	{
		front = newNode;
	}
	else
	{
		rear->next = newNode;
		rear = newNode;
	}
	//rear = newNode;
	return true;
}

bool queue::dequeue()
{
	//empty stack, has nothing to pop
	if(front == NULL)
	{
		cout << "Queue is empty." << endl;
	}
	else
	{
		node * temp = front;
		if(front == rear) //the only node
			front = rear = NULL;
		else
			front = front->next;

		temp->next = NULL;
		delete temp;
	}
	return true;
}

int Apothecary::MakePotions()
{
	queue Qd;

	Qd.dequeue();
	//nOrders--;

	return nOrders;
}

bool Apothecary::OrderPotion(PotionType potion)
{
	queue Q;

	if(nOrders < MaxOrders)
	{
		if(Q.enqueue(Potion(potion)))
		{
			nOrders++;
			return true;
		}
		else
		{
			cout << "enq failed" << endl;
			return false;
		}
	}
	else
	{
		cout << "Queue is full!" << endl;
		return false;
	}
}

/*void queue::Display()
{
	node * p = new node;
	p = front;

	if(front == NULL)
	{
		cout << "Nothing to display!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
	}
	else
	{
		cout << "worked" << endl;
	}
}*/



potion.cpp :

#include "Potion.h"
#include <iostream>

using namespace std;
#pragma warning(disable:4996) //allow strcpy

Potion::Potion():potionType(NULL)
{}

/*Potion::~Potion()
{

}*/

Potion::Potion(PotionType potion)
{
	SetType(PotionTypeString(potion));
}

const Potion& Potion::operator=(const Potion& student)
{
	//if it is a self copy, don't do anything
	if(this == &student)
		return *this;
	//make current object *this a copy of the passed in student
	else
	{
		SetType(student.potionType);
		return *this;
	}
}

void Potion::SetType(char* type)
{
	//set new type
	this->potionType = new char[strlen(type)+1];
	strcpy(this->potionType, type);
}

const char* const Potion::GetType()
{
	return potionType;
}




apothecary.h :

#ifndef APOTHECARY_H
#define APOTHECARY_H
#include "main.h"
#include "potion.h"
#include "queue.h"

class Apothecary
{
private:
	int MaxOrders;
	int MaxPotions;
	int nOrders;
	int nPotions;

public:
	Apothecary();
	Apothecary(int orders, int potions);
	bool OrderPotion(PotionType potion);
	int MakePotions();
};

#endif




queue.h :
#ifndef QUEUE_H
#define QUEUE_H
#include "potion.h"
#include "main.h"

class queue
{
public:
	queue();
	queue(const queue& aQueue);
	//~queue();

	const queue& operator= (const queue& aQueue);

	bool enqueue(const Potion&);
	bool dequeue();
	void Display();
	//bool peek(Potion&)const;
	//bool isEmpty(void)const;

private:
	struct node
	{
		Potion item;
		node * next;
	};

	node * front;
	node * rear;

};
#endif



main.h :

#pragma once
enum PotionType {UNKNOWN, SPEED, STRENGTH, HEALTH, WISDOM};
char* PotionTypeString(PotionType type);



potion.h:

#ifndef POTION_H
#define POTION_H
#include "main.h"

class Potion
{
private:
	char* potionType;

public:
	Potion();
	Potion(PotionType potion);
	//~Potion();

	void SetType(char* type);
	const char* const GetType();

	const Potion& operator=(const Potion& student);	 //overloading assignment operator
};

#endif




ERRORS :

/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp||In function ‘char* PotionTypeString(PotionType)’:|
/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp|16|warning: enumeration value ‘UNKNOWN’ not handled in switch [-Wswitch]|
/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp|30|error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]|
/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp||In function ‘void BuyPotion(Apothecary&)’:|
/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp|37|error: ‘class Apothecary’ has no member named ‘BuyPotion’|
/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp|38|error: cannot convert ‘const char*’ to ‘PotionType’ for argument ‘1’ to ‘char* PotionTypeString(PotionType)’|
/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp|39|error: no match for ‘operator<<’ in ‘std::cout << potion’|
/media/8c51a03d-e51b-4391-bab9-90222b696438/School/CS260/lab2/main.cpp|39|note: candidates are:|
/usr/include/c++/4.6/ostream|110|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|110|note:   no known conversion for argument 1 from ‘Potion’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&) {aka std::basic_ostream<char>& (*)(std::basic_ostream<char>&)}’|
/usr/include/c++/4.6/ostream|119|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>, std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]|
/usr/include/c++/4.6/ostream|119|note:   no known conversion for argument 1 from ‘Potion’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&) {aka std::basic_ios<char>& (*)(std::basic_ios<char>&)}’|
/usr/include/c++/4.6/ostream|129|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|129|note:   no known conversion for argument 1 from ‘Potion’ to ‘std::ios_base& (*)(std::ios_base&)’|
/usr/include/c++/4.6/ostream|167|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|167|note:   no known conversion for argument 1 from ‘Potion’ to ‘long int’|
/usr/include/c++/4.6/ostream|171|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|171|note:   no known conversion for argument 1 from ‘Potion’ to ‘long unsigned int’|
/usr/include/c++/4.6/ostream|175|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|175|note:   no known conversion for argument 1 from ‘Potion’ to ‘bool’|
/usr/include/c++/4.6/bits/ostream.tcc|93|note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char, _Traits = std::char_traits<char>]|
/usr/include/c++/4.6/bits/ostream.tcc|93|note:   no known conversion for argument 1 from ‘Potion’ to ‘short int’|
/usr/include/c++/4.6/ostream|182|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|182|note:   no known conversion for argument 1 from ‘Potion’ to ‘short unsigned int’|
/usr/include/c++/4.6/bits/ostream.tcc|107|note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char, _Traits = std::char_traits<char>]|
/usr/include/c++/4.6/bits/ostream.tcc|107|note:   no known conversion for argument 1 from ‘Potion’ to ‘int’|
/usr/include/c++/4.6/ostream|193|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|193|note:   no known conversion for argument 1 from ‘Potion’ to ‘unsigned int’|
/usr/include/c++/4.6/ostream|202|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|202|note:   no known conversion for argument 1 from ‘Potion’ to ‘long long int’|
/usr/include/c++/4.6/ostream|206|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|206|note:   no known conversion for argument 1 from ‘Potion’ to ‘long long unsigned int’|
/usr/include/c++/4.6/ostream|211|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|211|note:   no known conversion for argument 1 from ‘Potion’ to ‘double’|
/usr/include/c++/4.6/ostream|215|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|215|note:   no known conversion for argument 1 from ‘Potion’ to ‘float’|
/usr/include/c++/4.6/ostream|223|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|223|note:   no known conversion for argument 1 from ‘Potion’ to ‘long double’|
/usr/include/c++/4.6/ostream|227|note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]|
/usr/include/c++/4.6/ostream|227|note:   no known conversion for argument 1 from ‘Potion’ to ‘const void*’|
/usr/include/c++/4.6/bits/ostream.tcc|121|note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char, _Traits = std::char_traits<char>, std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]|
/usr/include/c++/4.6/bits/ostream.tcc|121|note:   no known conversion for argument 1 from ‘Potion’ to ‘std::basic_ostream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}’|
/usr/include/c++/4.6/bits/basic_string.h|2693|note: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)|
/usr/include/c++/4.6/ostream|451|note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)|
/usr/include/c++/4.6/ostream|456|note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)|
/usr/include/c++/4.6/ostream|462|note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)|
/usr/include/c++/4.6/ostream|468|note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)|
/usr/include/c++/4.6/ostream|473|note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)|
/usr/include/c++/4.6/ostream|493|note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)|
/usr/include/c++/4.6/bits/ostream.tcc|323|note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)|
/usr/include/c++/4.6/ostream|510|note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)|
/usr/include/c++/4.6/ostream|523|note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)|
/usr/include/c++/4.6/ostream|528|note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)|
||=== Build finished: 50 errors, 1 warnings ===|



Please help! Im not sure what these errors are or how to fix them?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>