Share your repls and programming experiences

← Back to all posts
cppdungeon level maker
h
sanjaykdragon (163)

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

Commentshotnewtop
CodingChad69 (9)

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

sanjaykdragon (163)

@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;

sanjaykdragon (163)

@iwanttocode3 using namespace std; isnt proper

SPQR (450)

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

sanjaykdragon (163)

@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 (450)

@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 :)

sanjaykdragon (163)

@SPQR its a level maker for my upcoming dungeon game