UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » C++
  • » function that takes type function

#1 2018-01-19 01:15 PM

neosphere
Member
From: Nepal
Registered: 2018-01-19
Posts: 1
Website

function that takes type function

i'm looking to create something like this but i don't know how to pass a function to another function and i cant figure it out from anything online

void function(){
25 * var +21
}

class new {
int var = 20;
public:
int output;
void process(void a){
output = a;
}
};
int main(){
new n;
n.process(function);
cout << n.output << endl;
}


Computer Training institutes Nepal @ neosphere.com.np

Offline

  • Index
  • » C++
  • » function that takes type function

Board footer

Powered by FluxBB