0
sir whats a method to create the program and whats we use the law and regulation in c++ code block programing sir plz tell me
sir solve my confusion
1 Réponse
0
Though the language is not that good, I believe you want to know more about methods.. first let's discuss a function. a function is made up of a collection of instructions. A function is a like a piece of code that runs in your code when you call it.. it does a specific task. How to create a function in cpp (refer to the cpp.course on sololearn
com)
return_type identifier(param) {
/* your logic here */
return value_of_return_type;
}
int add_two(int x) {
x += 2;
return x;
}
a method is the same as a function, just that a function is referred to as a method when using a class..
name the param in the function can be empty..n