Hi RamananKaliraja n,
Thank's for answer me, I made some modifications to my game...I hope that work thanks. again....
User Profile
Collapse
-
Logic Question...
Hi everybody,
I am making a tic-tac-toe game where should be payable by two humans, the game should display all the current player turn....my problem is in the logic, when i set the first player=true; .....the output is right for the first player, but not for the second one, or when i set the value of the second player to true, i got the problem in the first player output ej
Code:function players_turn() { turn1=false;
-
-
Button for tic tack toe
Ok I am doing a project that basically is a tic-tac-toe game in java script, and I wonder what kind of button I can use for the input X or O?
It has to be a button that sometimes can check by itself, so I am wondering what kind use it?
If Any suggestions or advice, I will appreciate....t hanks -
Thank you to everybody that replied, I got it working now......Leave a comment:
-
so far... this is my code, included the main:
Code:#include <iostream> #include <fstream> #include <string> #include <cstring> using namespace std; void functionInputFile(ifstream& infile, ofstream& outfile); struct LettersType { char CapitalLetters; //used for count capital letters. char SmallLetters; //used for count small letters.
Last edited by Frinavale; Dec 9 '09, 09:54 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.Leave a comment:
-
>five.cpp
1>c:\users\alfo nso\documents\v isual studio 2008\projects\f ive\five\five.c pp(51) : error C2784: 'std::basic_ost ream<_Elem,_Tra its> &std::operat or <<(std::basic_o stream<_Elem,_T raits> &,const std::basic_stri ng<_Elem,_Trait s,_Alloc> &)' : could not deduce template argument for 'std::basic_ost ream<_Elem,_Tra its> &' from 'std::istream'
1> c:\program files (x86)\microsoft...Leave a comment:
-
My function is not compiling....I need advice (Thanks);
Code:void functionInputFile(ifstream& infile) { string sti; //used for ask input file. string sto; //used for ask outputfile. cout<<"Enter the name of the input file where you want to read"; cin<<sti; cout<<"Enter the output file name: "; cin<<sto; infile.open(sti.c_str()); if(!infile)
Last edited by Frinavale; Dec 9 '09, 09:54 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags. -
abueno replied to I have this function that should count how many characters are letters in the Englishin CThank you whodgson, yes I forgotten to put some braces. I got it now.Leave a comment:
-
abueno started a topic I have this function that should count how many characters are letters in the Englishin CI have this function that should count how many characters are letters in the English
//It should count how many characters are letters in the English alphabet, and is
displaying the correct letters, but is not counting good.
Code:void FunctionCountLetters(char s[]) { int len; int i; len=strlen(s); cout<<"\n The lenght of the string is= "<<len<<endl; int counter=0; for(i=0; i<len; i++) { if((s[i]>='a'&&
-
Thank you Banfa,
I will try to assign different name variables, to see if that helps....and I will let sco, only for the valid input.Leave a comment:
-
Ok, I have an if, and the user enters a value outside of the range.....
Ok, I have an if statement, and the user enters a value outside of the range....
say:
int sco; //Variable used for score.
if(sco< 0 || sco > 100)
{
cout<<"Error, You have to enter on the range 0-100\n";
// I want to be able to subtract the last input from the total
// without affect the other valid amounts.
// So, I was... -
-
Thank you newb16 for answer...ok
on the bottom of counter2++;
// I will put:
total+=scoreu;
// And suppose scoreu has many values, like 90, 80, 70; I want the total to be able to add 90 + 80 + 70= 240.
// Right now scoreu is just registering the last value 70, and the other values like 90 and 80 not.Leave a comment:
-
how to avoid a value is override for other value in a loop in c++.
cout<<"Do you want to enter another score, enter 'y' or 'n' ?";
cin>>wish;
cout<<endl;
while((wish =='Y')||(wish =='y'))
{
cout<<"Enter score: ";
cin>>scoreu; //double variable that hold any score in the loop.
counter2++;
// I want to be able to...
No activity results to display
Show More
Leave a comment: