Community
RESOURCES
401
Stock Market GameThis is a stock market game in which you try to buy low and sell high for insane gains.
For anyone that is interested I just made an automated version of this game where a robot buys and sells automatically... It is not as fun buy idk I got tired of buying and selling. Here is the link https://replit.com/@OwenBlack/Automated-Stock-Market-Game?v=1
Thankyou guys for 25,000 runs!!! It means a lot to me and has motivated me to keep programming!
gabrieliusRaz  only took 163 days1 week ago
5
Feeshmora-PlaygroundA small project being made with OpenGL, for now.
11
WORDLE TodayShows my attempts at the daily WORDLE
https://www.powerlanguage.co.uk/wordle/
Check out my WORDLE game:
https://replit.com/@Frozones/WORDLE
RixTheTyrunt Can you please help? I am actually just a begginer to C++, so please? The code contains much errors...3 months ago
1
BasixBootleg C# parser generator.
Basix - Recursive Descent Parser Generator
Can generate parsers in JavaScript and C++ (Lexer for C++ not completed yet.)
Comes complete with a math interpreter and grammar definition example for JS.
It probably doesn't generate the cleanest syntax trees and has a lot of intermediate nodes but it works and in theory you can define any language you can think of.22
2
1
Country-BattleSimple 4X Game assignment. Making possible "Plus" version so I can add things that would otherwise be unfinished due to the due date.
On Github as well:
https://github.com/aidenpike/schoolprojects/tree/main/Country%20Battle
New Dice Game [ITA] named
A little and simple mini game about the dice roll.getkeyDetect keypresses in C++
Keypress detection in C/C++
We've all seen repls that make use of Python's getkey module to detect keypresses, most commonly to create controls for text-based games.
But what if you're like me and prefer making text-based games (and shooting yourself in the foot in the process) with C++ instead of Python? After all, C++ is way faster than Python.
The only problem with this is that keypress detection similar to Python's getkey is a little less obvious to implement, since C++ doesn't offer a module like this built in.
However, it does offer a header file that allows you to implement this rather easily: termios.h.
termios.h is a header file that allows you to programmatically change settings in the terminal (in POSIX systems, at least) by creating termios structs that contain terminal settings. You can copy, apply, and modify these using the tcsetattr and tcgetattr functions.
I won't go into these too in depth, if you really want to figure out how termios.h works in this repl, fork it or view the getkey.h header file.
Thank you for reading this post, I hope you learned something!20
2
0
string.compare(string) is returning strange values
This simple repl was only made to demonstrate the compare() function.
As you can see, two strings (str1 and str2) are declared and then compared to each other. Given the values of the strings ("baseball" and "basketball"), the correct returned value should be 6, but instead the program returns 1536. When I copy the same code into codeblocks, it returns the value 1.
Is there something wrong with my code?Highwayman @ZacharyRehg when comparing two strings using the `std::string::compare` method, the only time you are guaranteed to get an exact value is if the two strings are equal, in which case you will get a 0. In respect to the compare method, 6, 1, and 1536 are all exactly the same value — more than 0. I suggest reading the standards again: http://cplusplus.com/reference/string/string/compare/3 months ago