AKS in cpp