hi , I have a method to convert dec to bin
QList<bool> widgetInput::decToBin(int number)
{
int remainder;
QList<bool> result;
if(number <= 1) {
result << number;
return result;
}
remainder = number%2;
decToBin(number >> 1);
result << remainder;
}
but unfortunately this method only holds one element in list . but when I replace the "result << number" with "cout << number" it will work. could you please help me and let me know where is my exact problem?
regards.