Share your repls and programming experiences

← Back to all posts
cppdungeon level maker

Dungeon making script for my upcoming C++ dungeon game.

CodingChad69 (12)

Wow, this is a very cool and interesting code. I really like your work.


@CodingChad69 thanks for the upvotes kind sir!

iwanttocode3 (0)

hi I can't help but notice that you could've just used using namespace std;


@iwanttocode3 using namespace std; isnt proper

SPQR (592)

I'm not sure exactly what it does since it throws std::out_of_range at me if i input anything other than "break". I think it has something to do with the map. Maybe use something like

try {
//do something with std::map 
} catch (std::out_of_range) {
  printf("out_of_range thrown\n");

Note that i'm sure there is a way to use your program properly, but the average user (me included) won't want to spend a ton of time trying to figure it out :P


@SPQR fixing this in a sec, yeah right now this program will seem useless

edit: fixed that, and other user based errors.
the issue was with string.find -> std::string::npos

SPQR (592)

@sanjaykdragon Well I tried it again and it does indeed function now lol. Still not sure what exactly the end result is intended to be, but I'll be keeping an eye on this :)


@SPQR its a level maker for my upcoming dungeon game