CAN YOU CONVERT FROM C TO C++?
#include #include #includeint r_pc[3] = {0, 0, 0};int w_pc[3] = {0, 0};int lock = 0;int rlock = 0;int wlock = 0;int AR = 0;int critical_readers = 0;int critical_writers = 0;int panic = 0;int testandset(int *lock){if (*lock == 1)return 1;else{*lock = 1;return 0;}}
int r_pc[3] = {0, 0, 0};int w_pc[3] = {0, 0};
int lock = 0;int rlock = 0;int wlock = 0;
int AR = 0;
int critical_readers = 0;int critical_writers = 0;
int panic = 0;
int testandset(int *lock){if (*lock == 1)return 1;else{*lock = 1;return 0;}}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here