klimi
I'm sick
BinaryByter
while procedural is... well... hard to manage
Francisco
What paradigm do you prefer OOP, or procedural
There's also functional paradigm (see Haskell) or data oriented design
Anonymous
There's also functional paradigm (see Haskell) or data oriented design
Yea I heard functional is good for banking industry and programs that you don’t wAnt things to ever change
Anonymous
but OOP is very nice
I do like how you organize data with OOP
BinaryByter
thanks :D
klimi
thanks :D
*pats your head*
Anonymous
https://pastebin.com/yNNmL8F9
Anonymous
I have this tic tac toe game I built
Anonymous
In the gamefunctionality function everything works well, the choice variable takes int 1-9 and if it you put a int outside of that it returns a statement to choose another option , as intended
Anonymous
But if you input a character , it does this infinite loop and crashes my computer
BinaryByter
welcome to "the users are stupid and I have to deal with their idiocy"
Anonymous
welcome to "the users are stupid and I have to deal with their idiocy"
Lol well in the event that they are the way you explain . How do I stop this
Anonymous
https://pastebin.com/zxUb3spv
Anonymous
This is my header file
Anonymous
https://pastebin.com/ZrsMEy0J
Anonymous
And this is the main.cpp
BinaryByter
not enough data to help you, i'm sorry
Anonymous
One has a class which basically has all the functions in the game
Mihail
https://pastebin.com/yNNmL8F9
Am I missing something or you don't even have a main function?
Mihail
Oh
Mihail
Saw it now
Anonymous
Yea the main just created an object for the class and calls the gamefunctionality function
Anonymous
Admins of group ,Can you tell me will C and C++ help in that . But i need permission because it will be about android .
Anonymous
what
I think he is asking permission to ask a question not related to c/c++
Anonymous
Can I add photo about my idea about Samsung phone .
Anonymous
Can I upload photo
Mihail
Does the photo advertise anything?
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Script in init.d
Anonymous
Any help please ?
Mihail
What? Are you dumb?
Mihail
Also no that's completely stupid and unrelated to c/c++
Anonymous
😒😒
How bad is it lol
Mihail
😭
? I wasn't talking to you
Mihail
How bad is it lol
Not very, but they're are a few long if else statements that could be one simple for
Mihail
I'd help you, but I'm having some issues with my PC not booting lol
Kat
Not relevant to C. Also a bad idea. Android manages RAM by itself.
Anonymous
Script at init.d will run a.out( result of c or c++ code that will be compiled )
Kat
It theoretically can obviously but it's not that simple
Mihail
Android can't really run C like that.
Well maybe it could, but without access to any of the Android APIs and you need those to do like anything
Anonymous
?
My issue is the cin is to accept an int , and when it does it works fine , but if user enter a character or string , which is not suppose to be an option , and a message is to be printed out saying that it is not an option and to enter an int from 1-9 , which is what I intend , but that message loops infinitely and crashes my computer
Mihail
Oh
Mihail
Wait lemme check
Mihail
Looks fine
Anonymous
Compile it and type in a character lol
Mihail
yeah
Anonymous
Anonymous
That fixed it sorta
Mihail
nice
Mihail
now do you want to know a few things that could be improved?
Anonymous
Mihail
That would be useful of course 👏🏿
https://pastebin.com/PcRVTCiH this is the code for the mark selection, but using a for loop. One small thing is that you'll have to change the variable i, because you already use that one
Mihail
also do you even need the i that you currently have? i don't think so
Mihail
you can just put checkwin() in the while condition
Mihail
#noendl
Mihail
also you seem to use std::endl way too much you should take a look at these
Mihail
i don't use it with std::cout at all