Hi all,

I have a little question, my compiler is giving me the following error:

error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'std::istream'
see declaration of 'std::operator <<'

Here is the main part of my project.

#include <iostream>
#include <String>
#include <fstream>
#include "BTree.h"
using namespace std;

int Check(double Z);								//First Number Selected

int main()

	cout << "\tWelcome to Binary Tree Sorting Program" << endl;
	cout << "\nInput integers will be sorted." << endl;

	char symbol;
	BTree T;										//establish BTree class
	int Input;										//variable Insert

		cout << "\nPress I to input integers" << endl;
		cout << "\nPress D to display the list" << endl;
		cout << "\nPress E to exit the program" << endl;
		cout << "-> ";
		cin << symbol;
		cout << endl;

	case 'I':
	case 'i':
		for(int i=0;;i++)
		{												//loop until break called
			cout << "Insert number (Q to quit)";		//user interface
			cin >> Input;								//user input

			if(Input == -1)								//declare if break
				exit(0);								//break the loop
			if(Check(i))								//check if 1st input
				T.FInsert(Input);						//call FInsert
			else										//otherwise:
				T.Put(Input);							//call normal Put

	case 'D':
	case 'd':
			cout << "Displaying the list" << endl;
			cout << endl;
	case 'E':
	case 'e':
		if(symbol == 'e' || symbol == 'E')					//If the user press E or e, program terminates
	return 0;

int Check(double Z)
		return 1;
		return 0;

THanks for the help

wow, completely blind right now thats probably why i didnt get it haha

This article has been dead for over six months. Start a new discussion instead.