Category : array-of-structures

this is my sample code which is similar to my project, to simplify I created this dummy program. #include <iostream> using namespace std; struct str1{ int a1; }; void fun(str1 *x); int main() { str1 s; fun(&s); cout<<"print "<<s.a1<<endl; return 0; } void fun(str1 *x){ struct test{int c1;}tst; tst.c1 =7; for(int i= 0; i<9;i++){ x->a1=tst.c1; ..

Read more