Void
In Programming, void is a Mot-clé which one finds in the language C and several others Computer programming language of which it is in the beginning, like the C++, the C# or the Java. This keyword void can be used where usually the type of return of a function is placed, such as for example int for a Entier or string for a Character string. When the programmer written void , that allows to indicate to the Compilateur that the function does not return anything. This type of function does not exist in certain computer programming languages because they must absolutely return an object whose type is specified. However this concept of function without return exists all the same, for example in Pascal, one finds them under the name of Procédure. In algorithmy, they are indicated by the term of action.
The keyword void can also be used to declare a universal Pointeur like a pointer of function.
Examples
C++
When this function is called, it will post the message " Cuckoo! ".void to post () { cost << " Cuckoo! " << endl; }
Java
When this function is called, it will post the message " Cuckoo! ".void to post () { System.out.println (" Cuckoo! "); }
C
When this function is called, it will post the message " Cuckoo! ".void to post () { printf (" Cuckoo! "); }
This function will create a pointer of function on posting and carrying out this function.
void pointeurDeFonction () {
void (*p) ();
p = &afficher;
(*p) ();
}
| Random links: | Snowstorm | The Army of Nécromant | Camuy (Puerto Rico) | Trade union of the French bookstore | Jump of horse to the Olympic Games of 2000 | Kaoru_Ishikawa |