How to print alternative allele from VCF with htslib c++
see the code in https://github.com/samtools/htslib/blob/develop/vcf.c#L3104
 bcf_unpack((bcf1_t*)v, BCF_UN_ALL);// if you need genotypes too, might use another constant to avoid decoding all the structure
 (...)
 kputc('\t', s); // ALT
 if (v-&gt;n_allele &gt; 1) {
        for (i = 1; i &lt; v-&gt;n_allele; ++i) {
            if (i &gt; 1) kputc(',', s);
            kputs(v-&gt;d.allele[i], s);
        }
    }