Create a Function Prototype : Definition « Function « Visual C++ .NET






Create a Function Prototype

 


#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;


void TestRange(int val)
{
    if (val < 0) return;
    if ((val >= 0) && (val < 11))
        System::Console::WriteLine("val is between 0 and 10.");
    else
        System::Console::WriteLine("val is greater than 10.");
}
int main(void)
{
    int value = 25;
    TestRange(value);
    return 0;
}

   
  








Related examples in the same category

1.Pass value to a Function
2.Call a Function
3.global function