21 lines
247 B
C++
21 lines
247 B
C++
//
|
|
// Created by Christopher Hamer on 19/06/2024.
|
|
//
|
|
|
|
#include <mutex>
|
|
|
|
#ifndef TASK1_COUNTER_H
|
|
#define TASK1_COUNTER_H
|
|
|
|
|
|
class Counter {
|
|
public:
|
|
Counter();
|
|
int getNext();
|
|
private:
|
|
std::atomic<int> value;
|
|
};
|
|
|
|
|
|
#endif //TASK1_COUNTER_H
|