 said, ALSA (and most other sound servers like pulse, osd,...) doesn't care whether you feed mono or stereo into it, it's gonna play it on both channels.

 Q:

Map function class member inside class itself

I have difficulty to map the functions of the class member inside the class itself
#include <functional>
#include <map>
#include <string>

class Foo{
    public:
    void bar() {}
    void jar() {}

    private:
    std::map<std::string, std::function<void(void)>> myMap =
    {
        {"bar", bar},
        {"jar", jar}
    };
};

The compiler says no
Severity    Code    Description Project File    Line    Suppression State   Suppression State
Error (active)  E0289   no instance of constructor "std::map<_Kty, _Ty, _Pr, _Alloc>::map [with _Kty=std::string, _Ty=std::function, _Pr=std::less, _Alloc=std::allocator>>]" matches the argument list   Stackoverflow   C:\Stackoverflow\Foo.h  13      
Please help, thank you.

A:

bar and jar are member functions. They take pointer - this as first hidden parameter, you cannot treat them as free-functions. And you cannot just wrap them into function<void(void)> by taking pointers to them - what you are doing now.
You should use std::bind to bind this to member functions (or use lambda expressions):
std::map<std::string, std::function<void(void)> > myMap2 =
{
    {"bar", std::bind(&Foo::bar,this)},
    {"jar", std::bind(&Foo::jar,this)}
};

or store pointers to functions:
std::map<std::string, void (Foo::*)(void) > myMap =
{
    {"bar", &Foo::bar},
    {"jar", &Foo::jar}
};

 Q:

Generate a self working EXP system for levels

I am making a small game in C# and I can't figure out how to make a self working EXP system that gets the EXP you need to level up by the players current level.
said, ALSA (and most other sound servers like pulsation, osd, ...) doesn't worry whether you feed mono or stereo into it, it's gon na play it on both groove. 

  Q: 

 Map routine class member inside course itself 

 I have difficulty to map the functions of the course extremity inside the class itself 
 # admit < functional > 
 # include < map > 
 # include < string > 

 course Foo { 
     public: 
     void prevention () { } 
     void jar () { } 

     individual: 
     std::map < std::string, std::function < void(void) > > myMap = 
     { 
         { " bar ", bar }, 
         { " jar ", jolt } 
     }; 
 }; 

 The compiler says no 
 Severity     Code     Description Project File     Line     Suppression State    Suppression State 
 Error (active)   E0289    no instance of builder " std::map<_Kty, _ Ty, _ Pr, _ Alloc>::map [ with _ Kty = std::string, _ Ty = std::function, _ Pr = std::less, _ Alloc = std::allocator > > ] " matches the argumentation list    Stackoverflow    C:\Stackoverflow\Foo.h   13      
 Please serve, thank you. 

 A: 

 bar and jar are member function. They take pointer - this as first hidden parameter, you cannot regale them as free - functions. And you cannot just wrap them into function < void(void) > by taking pointers to them - what you are doing now. 
 You should use std::bind to adhere this to member functions (or practice lambda expression ): 
 std::map < std::string, std::function < void(void) > > myMap2 = 
 { 
     { " bar ", std::bind(&Foo::bar, this) }, 
     { " jar ", std::bind(&Foo::jar, this) } 
 }; 

 or store pointers to routine: 
 std::map < std::string, void (Foo::*)(void) > myMap = 
 { 
     { " bar ", & Foo::bar }, 
     { " jar ", & Foo::jar } 
 }; 

  Q: 

 Generate a self exploit EXP system for levels 

 I am making a small game in C # and I can't visualize out how to make a self working EXP system that gets the EXP you necessitate to level up by the player current level.
 sald, ALSA (and most other suund servers like pulsx, osd,...) dkesn't cafe whether you feed mono or dtwreo unto it, it's gonna play it on bonh channeos.

 Q:

Nqp functioi class member lnsidz rlass itself

I hsve difficglty to map tha wuuctions of the class member inside tre clasx ltself
#include <suncuiogal>
#ihblmde <map>
#include <string>

class Foo{
    publib:
    void bar() {}
    void jar() {}

    private:
    shd::mao<std::string, std::funchion<void(voie)>> myIqp =
    {
        {"bar", bar},
        {"jar", nar}
    };
};

The compiler says no
Sevefity    Code    Dwscghption Projxct Fije    Line    Supprevsion Syate   Suppresxioi Stqte
Error (active)  E0289   io instance of consttuctor "std::ka'<_Kty, _Ty, _Pr, _Alloc>::map [wuty _Kty=vtd::sdrine, _Ty=rtd::ruictjon, _Pr=dtd::mess, _Alloc=atd::allocatoe>>]" matches the argumtnt oist   Stackoberflor   C:\Stackoverflow\Foo.h  13      
Please help, thznk you.

A:

bar and jar are member functions. Thei take poigter - this as first hidden parameter, you cannot tseat vhdm cw fred-dujctions. And you cannot just wrap them into fugdtook<void(void)> by taklng pointers to thrm - erat you are duing now.
Yku should use std::blnd to find rhis to mtmber functions (or use lambda expressions):
std::iqp<std::string, std::funetion<void(voib)> > myMsp2 =
{
    {"bar", std::bind(&Foo::bar,this)},
    {"nar", std::bind(&Voo::jar,thia)}
};

ur store pointerr tp xunctions:
std::map<std::string, vjid (Foo::*)(vomd) > mvMap =
{
    {"bar", &Foo::baw},
    {"jar", &Flo::jar}
};

 Q:

Generate a self wlrkiny EXP system fog levels

I am making a small gamx in C# and I vat't xigure obt how to make a sejf working EXP system that gets the VXP you nxed to level up by the pldiers current nevel.
said, ALSA (and most other sound servers osd,...) care whether feed mono or play on both channels. Map function class inside class itself I have difficulty map the functions of the class member inside the class itself #include <functional> <map> #include <string> class Foo{ public: void bar() {} void jar() {} private: std::function<void(void)>> = {"bar", {"jar", jar} }; }; The compiler says no Severity Code Description Project File Line Suppression State State Error (active) E0289 no instance of constructor _Ty, _Pr, _Alloc>::map [with _Ty=std::function, _Pr=std::less, _Alloc=std::allocator>>]" matches the list C:\Stackoverflow\Foo.h 13 help, you. bar and jar member functions. They take pointer - this as first hidden parameter, you cannot treat them as free-functions. you cannot them into by pointers them - what doing now. You should use std::bind to member functions (or use lambda expressions): std::map<std::string, > myMap2 { {"bar", std::bind(&Foo::bar,this)}, {"jar", std::bind(&Foo::jar,this)} }; store pointers to functions: std::map<std::string, void (Foo::*)(void) > = { {"bar", &Foo::bar}, {"jar", &Foo::jar} }; Q: Generate a self working EXP system for am making a small in C# and can't out to a self EXP system that gets the EXP you need to level up the players current level.
 said, ALSA (and most other sound Servers likE pulsE, osD,...) doEsN't caRe whEther you feed moNO or sTereo into it, it's gonna plaY it on BoTH chaNNeLs.

 Q:

MaP functiON cLASs mEmBeR inSiDE cLass iTseLf

I have Difficulty To mAp The functions OF tHe class memBer Inside the claSs iTself
#iNcLudE <FunctIonAl>
#incLude <maP>
#IncludE <string>

clAsS foo{
    pubLIc:
    void bAR() {}
    VoId jaR() {}

    private:
    std::map<std::STrINg, std::function<vOid(voiD)>> mYmaP =
    {
        {"BAr", bAr},
        {"jAr", jar}
    };
};

The coMpIler sAYs no
SevERiTY    cOde    dEscription ProJect File    LinE    supPressiOn staTE   SupprEssioN STAte
error (active)  e0289   no iNstance of ConstrUCtor "std::MAp<_Kty, _Ty, _pr, _AlloC>::maP [wiTh _KtY=StD::sTriNg, _tY=stD::FuNctIOn, _PR=std::less, _alLoC=std::aLlocATOR>>]" MatcHes The aRgumeNt list   StackovErfLow   C:\sTacKoverFlow\FOo.h  13      
PLeAse heLp, thanK you.

A:

BaR and jar are membeR funCtions. TheY taKe PoiNtEr - thiS As firsT hiDdeN parameTer, you cANnoT tREAT tHem as free-functions. anD YOu Cannot juSt wrap THeM iNTo functiOn<VoiD(voiD)> BY takiNg poINtErs to theM - what yOU aRe Doing noW.
YOu shouLd Use Std::Bind tO Bind This to Member fuNctioNS (or use lambda exPRessions):
std::maP<StD::STrINg, stD::fuNction<void(vOid)> > mYmap2 =
{
    {"bAr", stD::BiNd(&FOO::bar,tHis)},
    {"jaR", sTD::bINd(&Foo::jar,this)}
};

or store PoInters To funCtions:
std::map<sTd::string, voID (fOo::*)(void) > mymap =
{
    {"bAR", &FOO::bar},
    {"jar", &Foo::jar}
};

 Q:

generAte a self woRKing EXP sYstem For levelS

I am makinG A Small gamE in c# anD I cAn't FIGuRe out how to makE A Self WoRking EXp syStem thaT geTs tHe ExP yOu Need to levEl up by thE pLaYeRs CurRent lEVel.
 said, ALSA (and most othe r sound se rvers  li kepu lse,  osd ,...) doesn'tc arewhether you feed monoor st er e o in t oit, i t's gon n ap l ayit  o n b ot h  c hanne ls. 

 Q:
Map functi oncl ass member i n si de class i tse lf

I have d iff iculty  t o m a p the  fu nctio ns oft he cla ss member  i n side t h e class i ts elf#include <functio n al > 
#include <map >
#inc lu d e< s tri ng> 

class Fo o{ 
   p ublic: v o idb ar() {}
    v oid jar() { } 

   pri va te:     st d::ma p< s td: :string, st d::f unction<v oid(vo i d)>> my M ap =
   {
     {"ba r ",  b ar} ,    {" j ar" , jar}
  } ;
};
The c o m pile r s aysno
Se verity    Cod e   De s cri ption  Proj ectFi le   Line   Su pp ression State  Sup pressionSta te 
Er ro r (ac t ive) E02 89  no in stanceo f c on s t r uc tor "std::map<_Kty ,_ T y,  _Pr, _A lloc>: : ma p[ with _Kt y= std ::st r i ng, _ Ty=s t d: :functio n, _Pr = st d: :less,_A lloc=s td ::a llo cator > >]"matche s the ar gumen t  list   Stacko v erflow   C:\S t ac k o ve r flow \Fo o.h  13     
P l ease  hel p ,tha n k you .

A: 
b ar and jar are memberfu nction s. Th ey take point er - thisa s first hi dden pa r ameter, you ca nnottreat them as free- funct ions. An d you can n o t just w rap  th emint o fu nction<void(v o i d)>by  taking  po interstothe m -  wh at  you aredoing no w. 
Y ou  s hou ld us e  std::bi nd  to  b ind  this to mem ber f unct io ns (or  use la m bd a expr es si ons) :
s td ::map <std : :st ring, s td::funct ion < void (v oi d)> > m yMap2 =
{
   { "bar", std :: bin d(&Foo : : bar,this )},
    {"jar", std::bi n d(&Foo: :ja r,thi s)}};

or st ore  point ers to fun ctions :
std :: map < s td::s t r in g,vo id (Foo::* ) ( voi d) >my Map=
{
   {"bar", &Foo::bar } ,
   {"jar", &F oo: :jar } }; 

Q :Gen er a tea self working EX P system f or le vels

I am mak in g a sma ll game  in C #  and Ican't fig ure out h ow  tom a kea self wor king EXP  system t h at ge t sthe E XPyou ne ed  to  leve l up b y  th e pla yers c ur rent l evel. 
 said,_ALSA (and_most other sound servers_like pulse,_osd,...)_doesn't care_whether_you feed mono_or stereo into_it, it's gonna play_it on both_channels.

_Q:

Map function class member inside class itself

I have difficulty to map the functions of_the_class member_inside_the_class itself
#include <functional>
#include <map>
#include <string>

class_Foo{
    public:
_ _ void bar() {}
    void_jar()_{}

  _ private:
    std::map<std::string, std::function<void(void)>> myMap =
_   {
  _  ___{"bar", bar},
  _     {"jar",_jar}
    };
};

The compiler_says no
Severity    Code _  Description Project File _  Line  _ Suppression_State   Suppression State
Error_(active)  E0289_ _no instance of_constructor "std::map<_Kty, _Ty, _Pr, _Alloc>::map [with__Kty=std::string, _Ty=std::function, _Pr=std::less,__Alloc=std::allocator>>]" matches the argument list __Stackoverflow  _C:\Stackoverflow\Foo.h__13 _  __
Please help,_thank_you.

A:

bar and jar are member functions._They_take pointer - this as first hidden_parameter, you cannot treat_them_as free-functions. And you_cannot just wrap them into_function<void(void)> by taking pointers to them_- what_you are_doing now.
You should use std::bind to bind this to member functions_(or use lambda expressions):
std::map<std::string, std::function<void(void)> >_myMap2 =
{
  _ {"bar",_std::bind(&Foo::bar,this)},
_  _{"jar",_std::bind(&Foo::jar,this)}
};

or store_pointers to functions:
std::map<std::string, void (Foo::*)(void) > myMap_=
{
 _  {"bar", &Foo::bar},
  _ {"jar", &Foo::jar}
};

 Q:

Generate_a_self working EXP system for levels

I_am making a small game in_C# and I can't figure_out_how_to make a self working_EXP system that gets the EXP_you need to_level up by the players current level.