Why is this code not working and giving error?

Why is this code not working and giving the error?

There should be 3 closing > in l in the class. Also check the spelling of addedge in function in class and when u call the function in main.