Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Structure of s void function

void FunctionName (Type1 FormalParameter1, Type2 FormalParameter2,
:
TypeN FormalParameterN)

NOTES:
1. A return statement is not used since a void fucntion does not return any value. 

Structure below is used to call the fucntion: 

FunctionName(ActualParameter1, ActualParameter2, ..., ActualParameterN );


- When the function is called, the value of ActualParameter1 is copied to FormalParameter1,
the value of ActualParameter2 to FormalParameter2, etc. 
- C++ is very precise about this. 
- The transfer of values between the actual and formal parameters always takes the order into account. 
- In other words, the first actual parameter always goes to the first formal parameter, and so on.
- As a result, there must always be the same number of actual parameters in the calling statement as the number of formal parameters in the function header, 
and their types must match, otherwise C++ will give an error message.
Comment

PREVIOUS NEXT
Code Example
Cpp :: polymorphism c++ virtual 
Cpp :: is there interfaces in c++ like 
Cpp :: c++ multiplication table rows and columns 
Cpp :: get array size 
Cpp :: frc limelight tracking 
Cpp :: Processing a string- CodeChef Solution in CPP 
Cpp :: Marin and Anti-coprime Permutation codeforces solution in c++ 
Cpp :: c++ rainbow text 
Cpp :: inversed priority queue 
Cpp :: beecrowd problem 1001 solution 
Cpp :: opencv read gif c++ 
Cpp :: passing a 2d array cpp 
Cpp :: iterator c++ 
Cpp :: vector remove class 
Cpp :: delete a head node in link list 
Cpp :: while loop c++ 
Cpp :: Arduino Counting without Millis 
Cpp :: computer vision libraries c++ 
Cpp :: how to find maximum value in c++ 
C :: docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]]. 
C :: conio.h linux 
C :: transpose of matrix using c program 
C :: if statement shorthand c 
C :: types of instruction and there meaning in c 
C :: how to genrate a random number in C 
C :: c program 
C :: printf type format 
C :: mutex c 
C :: matrix multiplication in c 
C :: append to list in c 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =