Answers for "void function example"

C++
21

how to declare a function in c++

// function example
#include <iostream>
using namespace std;

int addition (int a, int b)
{
  int r;
  r=a+b;
  return r;
}
Posted by: Guest on March-04-2020
2

void function

public void Yourvoidname()
{
	//Whatever you want to happen when your void is called
}


//somewhere else in your script, for example start()
void Start()
{
	Yourvoidname();
    //when the start function is called(first frame) your void will be called
}
Posted by: Guest on November-18-2020

Browse Popular Code Answers by Language