Error using C++ , asking to return pop as void when it should be int


  • 1
    J

    Error I'm getting : "Line 15: void value not ignored as it ought to be"
    I wrote "return q.pop()" for pop function which asks to return int but judge says it should be void. When I use void then another error code occurs where it asks to return something. Errors contradict themselves.


  • 1
    9

    I am having the same problem.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.