c++ lotto combinations

So i have to create a programm that reads 7-49 numbers and makes all posible combinations (6 number each) from the given numbers. Do you know how can i do this? I dont ask for the code ready but i cant think of a way i can create the combinations.