View Single Post
  #1 (permalink)  
Old 03-01-2007, 06:08 PM
theillbehaviored theillbehaviored is offline
Newbie
 
Join Date: Mar 2007
Posts: 1
Rep Power: 0
theillbehaviored is on a distinguished road
Default C++ help required

Im making this single player MUD with C++ and I keep getting theese error messages
  1. error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (
  2. or there is no acceptable conversion)
  3. error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (
  4. or there is no acceptable conversion)
  5. error C2447: missing function header (old-style formal list?)
  6. Error executing cl.exe."

Code:
 

#include <iostream>
#include <fstream>
#include <string>
#include <C:\Documents and Settings\Camper #1.IDKPPL\Desktop\MUD\look.h>
#include <C:\Documents and Settings\Camper #1.IDKPPL\Desktop\MUD\info.h>
#include <ctime>
using namespace std;



ifstream a_file ("info.txt");


 
void sleep(unsigned int mseconds)
{
    clock_t goal = mseconds + clock();
    while (goal > clock());
}
int info(int EXP,int HP);
int look(int room);
int main()

{
HP = 100;
EXP = 0;
room = 1;
string name;
string command("look");

cout<<"Whats your name?";
cin>> name;
cout<<"Welcome "<< name <<"\n";

switch (command)
{ case 'look':
look(); break;
case 'info':
info();
break;} 
return 0; }
Can someone please assist me?
Reply With Quote

Sponsored Links