Design snake and ladder game using oops

error

Hey @nmaurya760

class board{
    public:
    int destination = 50;
    virtual void getPositions(){
        //empty virtual
    }
};

I think i have done some logical error in main as well

***************Sir please respond

You havent called getPositions in main for snakes and ladders classes

Still wrong output

Please give m a INPUT output pair :slight_smile:

U can take any random values
Eg
No.of snakes 2
Positions 7 1
18 5
No. Of ladder 2
Position 4 10
11 17
Then for dice value u cn enter any nmbr frm 1-6
Whosoever first reaches the destination will win

Hey @nmaurya760

It is not printing the winner at the end
https://drive.google.com/file/d/1jF3SiPjPcC3GkCxhTB1iAfYmbwgPoP2v/view?usp=drivesdk

You are maybe going out of board
Do >=50 in condition for amswers
If it still does not work then share the exact input with me.

Can we implement
Map<string<pair<string,pair<string,string>>>

Hey @nmaurya760
There is nothing like string<> please check again and write the key value pair seperately

Can ve make
Map<pair<string, string>,pair<string, string>>

Please reply its urgent

Please solve this question my interview is going on please
https://drive.google.com/file/d/1kkYmAZX6aq4_vKMEDxoiZJTi8UgspAjt/view?usp=drivesdk

Yes u can do that …

Sorry I cant help u with something unethical