Share your repls and programming experiences

← Back to all posts
C++ Stock Market

C++ Stock Market Sim

A simple C++ Stock Market Simulator.
Play the game in full screen

Welcome to an old project I
made a long time ago, but lost
the project. Now I'm trying to revive
the old program.

You can view this on Github here!


Submit Idea to add a new stock. You can submit it here!

Upcoming Updates

Stock voting in the link above. Name a stock and it might be in game.
Planning on fixing the script and making if's switch statements. Also planning on adding more stocks.

Version History

Version 1.2.4

Added highest value, also added >> when entering.

Version 1.2.3

Changed the rates of stock increase, should increase more.

Version 1.2.2

Fixed the leap year bug, now leap year actually works.

Version 1.2.1

Added title screen

Version 1.2

Added third stock

Version 1.1.2

Fixed negative decrease rate, it was too high.

Version 1.1.1

Added month and year.

Version 1.1

Added second stock

Version 1.0.1

Fixed stock change to show negative decrease.

Version 1.0

Initial game release. Only one stock (named Goo), but am planning to add more.


the repl stock should only have positive change.


I actually love this! It's so simple but mildly entertaining. I think I lost to myself though :( Anyways, I know the other guy already said this, but that switch case code would greatly help you here. Other than that, nice work!


@StevenMatiz Thanks, but it might take me some time to do the switch case code

  1. very ugly code
  2. use a switch case instead of 20000 if statements
  3. instead of rand()
  4. use classes and namespaces (or soon to be modules - c++20)
  5. use an actual code_style (or codeStyle / CODE-STYLE)
  6. stop "using namespace std;" :angry:
  7. stop putting spaces before (), it looks weird