Skip to content
Community
#cpp
1.8K
RESOURCES
TheDrone7
Welcome to Replit Community [+ Rules]
TheDrone7
EVENTS
TOP TAGS
#games
93
#apps
23
#python
24.7K
#javascript
8.9K
#html
8.4K
#fun
4.1K
#game
3.6K
#simple
3.3K
#python3
2.6K
#java
2K
#cpp
1.8K
#bash
1.1K
OwenBlack
OwenBlack
published a Repl
3 months ago
401
Stock Market Game
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!
#fun
#stocks
#cpp
+2
CobinMoorman
CobinMoorman i accidentally typed all and the game broke1 week ago
gabrieliusRaz
gabrieliusRaz ![image](https://storage.googleapis.com/replit/images/1652443498091_e0582bca04f52077b6e5435800a913c3.png) only took 163 days1 week ago
DaFeesh
DaFeesh
published a Repl
2 months ago
5
Feeshmora-Playground
Feeshmora-PlaygroundA small project being made with OpenGL, for now.
DANIELORTIZ33
DANIELORTIZ33 Es lo mas extraño que e visto en mi pta vida... me encanto 1 week ago
Duckyram
Duckyram bad guy oh no1 week ago
Frozones
Frozones
published a Repl
2 months ago
11
WORDLE Today
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
RixTheTyrunt Can you please help? I am actually just a begginer to C++, so please? The code contains much errors...3 months ago
RixTheTyrunt
RixTheTyrunt AAA WHAT DID I DO- 5 errors**...** Looks like **more than 5.**3 months ago
CSharpIsGud
CSharpIsGud
published a Post
2 months ago
1
Basix
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.
Selisine
Selisine
published a Repl
2 days ago
Country-Battle
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
YellowSquash262
YellowSquash262 velumptious 2 days ago
AlexBertuccioli
AlexBertuccioli
published a Post
3 months ago
I DADI DI VARSAVIA
New Dice Game [ITA] named
A little and simple mini game about the dice roll.
ZekeAdame
ZekeAdame @AlexBertuccioli Is the game in spanish? 3 months ago
AlexBertuccioli
AlexBertuccioli @ZekeAdame In italian language. 3 months ago
parsec00
parsec00
published a Post
3 weeks ago
getkey
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!
coulton64
coulton64
published a Repl
2 months ago
coulton64
coulton64 description: C++ Recreation of Wordle. Uses the original word list and picks a random word (like Wordle Unlimited)2 months ago
lobear1412
lobear1412
published a Repl
3 months ago
lobear1412
lobear1412 Restaurant is canonically the name of your restaurant.3 months ago
ZacharyRehg
ZacharyRehg
published a Post
3 months ago
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
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
Load more