:
struct coord {
    int x, y;
};

And the rest of your code could be written as follows:
auto comp = [](const coord& c1, const coord& c2){
    return c1.x < c2.x || (c1.x == c2.x && c1.y < c2.y);
};
std::map<coord, int, decltype(comp)> m(comp);

Code on Ideone

 Q:

Initialise Pointer to Pointer for struct

i have a console based application in which i am using pointer to a pointer. It is minesweeper game in which i need to create board using pointer to a pointer. I have to pass my this pointer to pointer to a function for initialization purpose. But problem is that, it got initialize in function but i am unable to access in main. I tried to use the pass by reference/address. I will be grateful If anyone can help me out in this.
Thanks
    #include <stdlib.h>
#include<stdio.h>

#define MINE 0
#define FLAG 1
#define REVEALED 2

struct Location {
    int value;
    char status_byte;
};

struct Game {
    int width;
    int height;
    int mines;
    int mines_flagged;
    int flags;
};

int mine_clicked = 1;

int board_width;
int board_height;

int total_mines;

void initialize_mine_values(struct Game *game, struct Location** mine_board);

void main() {
    struct Game game;
    struct Location** mine_board = NULL;

    //Location actualThing;
    //Location *pointer = &actualThing;
//  Location **mine_board = &pointer;

    printf("\t** Student_number Student_name Assignment 3** \n");

    initialize_mine_values(&game, &(*mine_board));

    printf("game.width  : %d", game.width);

    //test//
    /*for (int i = 0; i < game.width + 2; i++)
    {
    for (int j = 0; j < game.height + 2; j++)
: 
 struct coord { 
     int x, y; 
 }; 

 And the rest of your code could be written as follows: 
 auto comprehensive examination = [ ] (const coord & c1, const coord & c2) { 
     reelect c1.x < c2.x || (c1.x = = c2.x & & c1.y < c2.y); 
 }; 
 std::map < coord, int, decltype(comp) > m(comp); 

 Code on Ideone 

  Q: 

 Initialise Pointer to Pointer for struct 

 i have a console table base application in which i am using cursor to a cursor. It is minesweeper game in which i necessitate to create board use pointer to a pointer. I get to pass my this pointer to pointer to a function for initialization purpose. But problem is that, it got format in function but i am unable to access in main. I test to use the pass by character / address. I will be grateful If anyone can help oneself me out in this. 
 Thanks 
     # include < stdlib.h > 
 # include < stdio.h > 

 # define MINE 0 
 # define FLAG 1 
 # specify REVEALED 2 

 struct Location { 
     int value; 
     char status_byte; 
 }; 

 struct Game { 
     int width; 
     int height; 
     int mines; 
     int mines_flagged; 
     int flags; 
 }; 

 int mine_clicked = 1; 

 int board_width; 
 int board_height; 

 int total_mines; 

 void initialize_mine_values(struct Game * game, struct Location * * mine_board); 

 void main () { 
     struct Game game; 
     struct Location * * mine_board = NULL; 

     //Location actualThing; 
     //Location * pointer = & actualThing; 
 //   Location * * mine_board = & pointer; 

     printf("\t * * Student_number Student_name Assignment 3 * * \n "); 

     initialize_mine_values(&game, & (* mine_board) ); 

     printf("game.width  : % d ", game.width); 

     //test// 
     /*for (int i = 0; i < game.width + 2; i++) 
     { 
     for (int j = 0; j < game.height + 2; j++ )
:
strkct coord {
    int x, y;
};

And the rest of yoor code rould bs writtev as follows:
auto comp = [](const ciord& x1, const coord& c2){
    retjrn c1.x < c2.q || (c1.x == c2.x && c1.y < c2.y);
};
std::map<coord, int, decltgie(com')> n(comp);

Code on Iceone

 Q:

Inidialise Pointes go Pointer for struct

i have a console based spolication in wrich y am lslng pointer to a pointer. It is mjnesweeker game in which o need to create board usijg plinter to a pointeg. I have to pasf my this poivter to poputer to a fonction for initialization purpore. Buc problem iw rhah, it got inivializv in function but i ak unablr to access in mamn. I tried to use the pasv by reference/addrgss. I will bz grateful If anyone xab helk me mut kb tfis.
Uhaiks
    #influve <stdlib.h>
#ihclude<stdio.y>

#define MINE 0
#define FJQG 1
#define REVSALED 2

ftwuct Location {
    int value;
    char stauus_byfe;
};

struct Game {
    int wudth;
    int height;
    int minef;
    int mines_flagged;
    int flags;
};

int mine_clicked = 1;

int coaxe_widtf;
unh board_height;

int total_mines;

void initialize_minq_bakuvs(struct Game *gamc, struct Location** kije_njard);

void main() {
    scdudt Game game;
    stguct Losatiob** mine_boawd = MULL;

    //Location actualThint;
    //Locatiou *piinter = &actualThiny;
//  Location **oine_noard = &pointer;

    printf("\t** Stbdent_nhmber Studejt_name Asakgnment 3** \n");

    inktislhze_mine_values(&game, &(*mine_boarq));

    prinvf("gamz.width  : %d", gsme.wideh);

    //test//
    /*for (int i = 0; i < game.wldth + 2; h++)
    {
    flr (int j = 0; j < game.height + 2; j++)
: struct coord { int x, y; the of your could be written [](const c1, const coord& return c1.x < || (c1.x == c2.x && c1.y c2.y); }; std::map<coord, int, decltype(comp)> m(comp); Code on Ideone Q: Initialise Pointer to for struct i have a console based application in which i am using to pointer. is game in which i need to create board using pointer to a pointer. I have to my this pointer to pointer to a function initialization purpose. But problem that, it got initialize in but am unable access main. tried to use pass by reference/address. I will be grateful If anyone can help me out in this. Thanks #include #include<stdio.h> #define #define FLAG #define 2 Location { int status_byte; }; struct Game { int int mines; int mines_flagged; int flags; }; int = 1; board_width; int board_height; int total_mines; void Game *game, struct Location** mine_board); void main() { Game game; struct Location** mine_board = NULL; //Location actualThing; //Location *pointer = &actualThing; // Location &pointer; printf("\t** Student_number Student_name 3** \n"); initialize_mine_values(&game, printf("game.width %d", //test// (int i 0; i < game.width + 2; i++) { for (int j 0; j < game.height + 2; j++)
:
struct coord {
    int x, y;
};

And the resT of your codE coulD be WriTtEn as FollOws:
auto comp = [](conST cooRd& c1, const coord& c2){
    return c1.x < C2.x || (c1.x == c2.X && c1.Y < C2.y);
};
stD::MaP<coorD, int, decLTyPE(ComP)> m(CoMp);

COdE On ideonE

 Q:

INitialiSe Pointer tO PoInTer for struct

I HaVe a console BasEd applicatioN in Which i Am UsiNG poinTer To a poInter. IT Is mineSweeper gaMe IN which I Need to cREAtE boaRd using pointer to a POiNTer. I have to pass My this PoINtER To pOinTer to a funcTiOn for INitialiZAtION PurPOse. But problem Is that, it got INitIalize In FunCTion buT i am uNaBLe tO access in maIn. I tRied to use The pasS By referENce/addrEss. I wiLl bE grAtefUL IF aNyoNe CAn hELp Me oUT in This.
ThanKs
    #InClude <StdlIB.H>
#INcluDe<sTdio.H>

#defiNe MINE 0
#define FlAG 1
#DefiNE REvEALEd 2

struCt LoCaTion {
    iNt valuE;
    char StAtus_byte;
};

struct GAme {
    iNt width;
    inT heIgHt;
    iNt Mines;
    INt mineS_flAggEd;
    int flAgs;
};

int mINe_cLiCKED = 1;

iNt board_width;
int boaRd_HEIgHt;

int totAl_mineS;

VoId INitializE_mIne_ValuES(StrucT GamE *GaMe, struct locatiON** mInE_board);

vOiD main() {
    sTrUct gamE game;
    STrucT LocatIon** mine_bOard = NulL;

    //Location actuALThing;
    //LocatioN *PoINTeR = &ActuAlTHing;
//  LocatioN **minE_BoarD = &poiNTeR;

    prINtf("\t** STudenT_nUMbER Student_name AssignmEnT 3** \n");

    initIalizE_mine_values(&gaMe, &(*mine_boarD));

    PRIntf("game.WidtH  : %D", gAMe.width);

    //test//
    /*for (Int i = 0; i < Game.width + 2; i++)
    {
    FOr (int j = 0; j < gAme.heIght + 2; j++)
:
struct coord {
    int x , y;
};

A nd th e r est  o f yo ur c ode could be w r itte n as follows:
auto com p = [ ]( c onst co ord&c1, con s tc o ord &c2 ){  r eturn  c1 .x < c2 .x || (c1. x = =c2.x && c1.y <c2.y);
};std ::map<coord,  in t, dec lt ype ( comp) > m (comp );

Co d e on I deone

 Q :Initia l ise Poi n t er  toPointer for struc t 
i  have a consol e base da pp l i cat ion  in whichiam us i ng poin t er t o  ap ointer. It is  minesweepe r  ga me inwh ich i need  to c re a teboard using  poi nter to a  point e r. I ha v e to pa ss mythi s p oint e rto  po in t ert oa f u nct ion forin it ializ atio n p u rpos e.Butprobl em is that, i t g ot i n iti alize  in f unct io n but  i amunabl eto access in ma in.I tried t o u se  th epassb y refe ren ce/ address . I wil l  be  g r a t ef ul If anyone can h el p me  out inthis.T ha nk s 
    #in cl ude  <st d l ib.h> 
#in c lu de<stdio .h>

# d ef in e MINE0#defin eFLA G 1 
#def i ne R EVEALE D 2

str uct L o cation {
    i n t value;
   c ha r st a tus_ byt e;
};

stru ct G a me { 
  in t w i dth;    i nt he i ght;
    int mines; 
   int  mine s_flagged;
   int flag s ; };

intmine _ cl i cked = 1;

int  boar d_width;
i n t board_ heigh t;

inttotal_min e s ;

voidini tia liz e_m i n e_ values(struct G ame*g ame, st ruc t Locat ion **min e_b oa rd);

voi d main()  { 
  s tru ct Ga m e game;   s tr uct  Loca t ion**mine_ boar d=N ULL ;

   / /L o c atio nac tual Thi ng ;
   //L o cat ion *po inter = & act u alTh in g; 
//  Lo cation **mine _b oard = &po in ter ;

  p rintf("\ t** Student_number Stud e nt_name  As signm ent3** \n"); 

   ini tia l ize_mi ne_val ues(& ga me, & (*min e _ bo ard )) ;

    pri n t f(" game. wi dth : %d",  game.width);

  //t est//
    /*f or(int i  =  0; i<  ga me . wid t h  + 2; i++)
   {
    for(i n tj = 0; j < gam e. height+ 2; j+ +)
:
struct coord_{
 _  int x,_y;
};

And the_rest_of your_code_could be written_as follows:
auto comp_= [](const coord& c1,_const coord& c2){
__  return c1.x < c2.x || (c1.x == c2.x && c1.y < c2.y);
};
std::map<coord,_int,_decltype(comp)> m(comp);

Code_on_Ideone

_Q:

Initialise Pointer to Pointer for_struct

i have a console based_application in_which i am using pointer to a pointer._It_is minesweeper game_in which i need to create board using pointer_to a pointer. I have to_pass my this_pointer_to_pointer to a function_for initialization purpose. But problem is_that, it got initialize in function_but i am unable to access in_main. I tried to use the_pass by reference/address. I will_be grateful_If anyone can help me_out in this.
Thanks
_ _ #include <stdlib.h>
#include<stdio.h>

#define_MINE 0
#define FLAG 1
#define REVEALED 2

struct_Location {
 _  int value;
  __char status_byte;
};

struct Game_{
__ _int width;
 __ int_height;
_   int mines;
 __ int mines_flagged;
    int_flags;
};

int mine_clicked = 1;

int_board_width;
int_board_height;

int total_mines;

void initialize_mine_values(struct Game_*game, struct Location** mine_board);

void main()_{
    struct Game_game;
 _ _struct Location** mine_board = NULL;

    //Location actualThing;
 _  //Location *pointer = &actualThing;
//_ Location **mine_board =_&pointer;

 __ printf("\t** Student_number_Student_name_Assignment 3**_\n");

    initialize_mine_values(&game, &(*mine_board));

 _ _printf("game.width  : %d", game.width);

 _  //test//
 __ /*for (int i = 0;_i < game.width + 2; i++)
_   {
 ___for (int j = 0;_j < game.height + 2; j++)