#cin error

9 messages · Page 1 of 1 (latest)

charred onyxBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

tiny wind
#
#include <iostream>

using namespace std;
int main(){
    // 2 players roll dice to start (highest start):
    // roles:
    cout << "PLAYER 1 (X) and PLAYER 2 (O)" << endl;
    // making the grid line per line
    // first line:
    cout << "     " << "|" << "     " << "|" << "     " << endl;
    // second line:
    cout << "  1  " << "|" << "  2  " << "|" << "  3  " << endl;
    // third line (starting the second row of grid):
    cout << "_____" << "|" << "_____" << "|" << "_____" << endl;
    // The same with other numbers:
    cout << "     " << "|" << "     " << "|" << "     " << endl;
    cout << "  4  " << "|" << "  5  " << "|" << "  6  " << endl;
    cout << "_____" << "|" << "_____" << "|" << "_____" << endl;
    cout << "     " << "|" << "     " << "|" << "     " << endl;
    cout << "  7  " << "|" << "  8  " << "|" << "  9  " << endl;
    cout << "     " << "|" << "     " << "|" << "     " << endl;

    // coordinates and move (X or O):
    int x;
    string y;

    // asking the players to make a move
    cin >> "Place?" >> x >> "and";
}
#

at ```c++
cin >> "Place?" >> x >> "and";

pseudo wing
#

can you specify the error?

tiny wind
#

29 | cin >> "Place?" >> x >> "and";
| ^~~~~~~
| |
| const char*

dapper nebula
#

dont mix these

tiny wind
#

oh ok thnx man

charred onyxBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.