Jerry Ma
@RongjinMa
1
New to C++, can someone help me debug
I dont know whats wrong with my code, it keeps saying core dumped segemation failedRongjinMa @Highwayman a bit late, but could you emphasize on passing around global variables?1 year ago
Highwayman @RongjinMa
Sure thing!
All I really mean to say is that instead of having a global variable for something like `extern board` or `extern pieces`, you'd change your functions like `void createBoard()` to `void createBoard(vec<vec<char>>&)` and declare `board` inside of the main scope. There isn't much reason to declare it outside of main as you *don't* actually have no other way of accessing the board from your functions, and making mutable global variables is just bad practice for the future, apparently...
Honestly, if I were you, I would have just made a little class/struct for board instead of a bunch of separate functions, but yeah... 1 year ago
55
10
1
0
Change console text color
Hi, I am wondering if there is a way to change the color of text in the console. I am not using a windows computer so I cannot use34
10
0
0
how to get server variable?
my freind made this: https://replit.com/@GabrielWest2/kahootclone?v=1
i was wondering how he made a server variable and how to do it in cppPikachuB2005 @RongjinMa Those are only for node and python. For C++ you should just write files to save/retrieve data. Here: https://www.cplusplus.com/doc/tutorial/files/1 year ago
34
10
0
0
Cloud Variables In C++??
Hi guys, I am wondering if there are variables that carry over even if the program is stopped in C++PikachuB2005 @SixBeeps What's wrong with Scratch (for younger kids)? I was able to use replit to mess up cloud games on there lol rip griffpatch1 year ago
34
10
0
0
0
Leap Year CalculatorCalculates if year is leap year or not
14
0
0
0
4
2
0
2
Sorting System10 int sorting system
11
2
2
0
Excuse GeneratorMakes a random excuse
64
4
0
YeliBello You can save nearly 11 seconds in loading by typing "java Main"(without quotes) in the shell2 years ago