homework/cpp/myfuncStructOOP.h

22 lines
527 B
C
Raw Permalink Normal View History

2024-05-23 10:49:57 +00:00
#ifndef MYFUNCSTRUCTOOP_H
#define MYFUNCSTRUCTOOP_H
#include <stdint.h>
typedef struct ZliczaczStructOOP ZliczaczStructOOP;
struct ZliczaczStructOOP {
// Data members
const char* alfabet;
const char* slowo;
uint8_t* wynik; // Pointer to an array for results
// Function pointers, acting as 'methods'
void (*count_characters)(ZliczaczStructOOP*);
};
void initializeZliczaczStructOOP(ZliczaczStructOOP* zliczacz, const char* alfabet, const char* slowo, uint8_t* wynik);
#endif // MYFUNCSTRUCTOOP_H