Define local variable in function - C++ Function

C++ examples for Function:Function Creation

Description

Define local variable in function

Demo Code

#include <iostream>

using namespace std;

void Function()//  ww w . j a  v  a  2 s .  co  m
{
    int a{ 0 };

    cout << a;
}

int main(int argc, char* argv[])
{
    Function();

    return 0;
}

Result


Related Tutorials