Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
251 B
0
Indexable
Never
char* alokuj(int rozmiar) {
        char* tab = new char[rozmiar + 2];
       memcpy(tab, &rozmiar,sizeof(uint16_t));
       
        return tab+2;
    }

    void dealokuj(char* &tab) {
        delete[] (tab-2);
        tab = nullptr;
    }