C++ global scope1 [Notes] Ch.15 Functions in C++ (Runestone) I. Function Basics 1. Basic structure of a function in C++ int square(int n){ Return n * n; } The function square takes one int parameter (a variable you can use in your function code), and returns an int value. Ex) calling the function: int x = 3; int y = square(x); cout 2022. 11. 18. 이전 1 다음