E2468 Value of type void is not allowed (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

A value of type void is really not a value at all, so it can't appear in any context where an actual value is required.

Such contexts include the following:

  • the right side of an assignment
  • an argument of a function
  • the controlling expression of an if, for, or while statement.