banker’s algorithm in c++

When checking if two primitive types are equal, you need to use “==” instead of “=”
e.g, change your if statements from

if ( r = 1 )

to

if (r == 1)

Leave a Comment