M
m.labanowicz
Hi,
There is interesting example about NULL and reference usage in C++
typedef struct {
int a [2];
} s_t;
int bar(int v, s_t &s) {
return v ? s.a[0] : 0;
}
int main(int argc, char * argv []) {
s_t local;
s_t * ptr = &local;
ptr = 0;
((void)(argv));
return bar(argc - 1, *ptr);
}
Which line do you expect that APP crashes ?
Regards
There is interesting example about NULL and reference usage in C++
typedef struct {
int a [2];
} s_t;
int bar(int v, s_t &s) {
return v ? s.a[0] : 0;
}
int main(int argc, char * argv []) {
s_t local;
s_t * ptr = &local;
ptr = 0;
((void)(argv));
return bar(argc - 1, *ptr);
}
Which line do you expect that APP crashes ?
Regards