I need some help, I am completely new, and I'm getting these errors, which I don't understand. If someone could correct my code and or explain what these errors are and why they are happening that would be superb.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#include <iostream>
#include <string>
int main()
{
}
int playerInput
{
std::cout << "type 'help' for more information";
std::string playerEnter = std::cin;
if (playerEnter = help)
{
std::cout << "help placeholder";
}
}
int playerTurn()
{
int turnNumbers = turnNumbers + 1;
}
|
..\Playground\:10:52: error: expected '}' before ';' token
std::cout << "type 'help' for more information";
^
..\Playground\:10:15: error: invalid user-defined conversion from 'std::basic_ostream<char>' to 'int' [-fpermissive]
std::cout << "type 'help' for more information";
^
In file included from ..\Playground\\include\c++\ios:44:0,
from ..\Playground\\include\c++\ostream:38,
from ..\Playground\\include\c++\iostream:39,
from ..\Playground\:1:
..\Playground\\include\c++\bits\basic_ios.h:115:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match>
operator void*() const
^
..\Playground\\include\c++\bits\basic_ios.h:115:7: note: no known conversion for implicit 'this' parameter from 'void*' to 'int'
..\Playground\:11:36: error: conversion from 'std::istream {aka std::basic_istream<char>}' to non-scalar type 'std::string {aka std::basic_string<char>}' requested
std::string playerEnter = std::cin;
^
..\Playground\:12:5: error: expected unqualified-id before 'if'
if (playerEnter = help)
^
..\Playground\:16:1: error: expected declaration before '}' token
}
^