Void | SoloLearn: Learn to code for FREE!



Hey I am a beginner and have problems with void . Could somebody help me??


10/25/2016 6:38:55 PM

Mateusz Ignacy

3 Answers

New Answer


void is data type which is typically has no value or we can say it is blank ... also in reference to declaration in a program we can say that it can be assigned any value


Void as the return type means that the function doesn't return anything. If put in the parameter field, it means that the function doesn't have any parameter. void printAnswer(void){ cout << 42 << endl; }


Thanks guys