i am new to this forum. In c programing language i got one doubt regarind structures.
1.how can we define default values to structure members?
2. i compiled below program by seeing in one forum .its like
but i getting error while compiling the program.Code:struct s { int i,j; s() :i(0),j(0){} }; int main() { struct s s1; printf("%d \n",s1.i); printf("%d\n",s1.j); return 0; }
how can we define our own values to structure by above programing