Wildcard Pattern Matching problem

Why is my code giving compilation error? Also is my recursive logic correct ?
Code link: https://ide.codingblocks.com/s/160810

Hello @raj.bmp.333

You cannot pass “dp” as a parameter in the match function.
Declare dp as a global variable instead.

Here is the modified code

But your code also has some logical error
it does not work for below test case.
Dry run to see what is going wrong.
aaa
a*b