Monday, July 27, 2009

Please help with this! error C2664: cannot convert parameter from 'char []' to 'int &'?

What's this mean? I can't figure out where the error is in my code.





Here is where the error is popping up.....





char c[9] = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '};


MoveCount = 0;


Win = false;


CatsGame = false;





system("cls");


SetArray(c);


DisplayBoard();














while (true)


{


PlayerNumber = 1;


PlayersTurn(UserInput, MoveCount, c, PlayerNumber, Player1Wins, Player2Wins, ComputerWins, Win, CatsGame);








Error 1 error C2664: 'PlayersTurn' : cannot convert parameter 3 from 'char [9]' to 'int %26amp;' c:\users\chris-brittany\desktop\chris... stuff\cwp's c++ programs\other programs\tic tac toe\tic tac test\tic tac test\tictactoe .cpp 44








I think char[9] is referring to c.??? Please help.

Please help with this! error C2664: cannot convert parameter from 'char []' to 'int %26amp;'?
In other words, you need to convert a char to its ascii value.





atoi() does the conversion (stdlib)


No comments:

Post a Comment