confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
7.37k stars 3.11k forks source link

Pr 1 #4665

Closed KhandekaKeya closed 2 months ago

KhandekaKeya commented 3 months ago

include

class Incrementer { private:     static int count;

public:     static void increment() {         count++;     }

    static int getCount() {         return count;     } };

int Incrementer::count = 0;

int main() {     Incrementer::increment();     Incrementer::increment();     Incrementer::increment();

    int result = Incrementer::getCount();     std::cout << "The value of the variable after incrementing 3 times is: " << result << std::endl;

    return 0; }