Advertisement
Felanpro

void Usement in C++

Nov 3rd, 2015
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. Functions:
  2.  
  3. void is used when your function doesn't return anything.
  4.  
  5. For example.
  6.  
  7. int main()
  8. {
  9. return 0; //It returns an integer because it's an int function.
  10. }
  11. //but
  12. void nameForFunction()                //You don't have to return anything because you used void.
  13. {
  14. cout << "Hello" << endl;        
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement