I have a very simple question.
I want to write the below line of code in 2 lines :
IplImage *image = 0;
like :
IplImage *image;
image = 0;
I want to know what I have written is correct or else I want to know how to write the correct one (in two lines).
Thanks
Perfectly correct. But if you don’t have a very good reason to do it that way, I’d suggest leaving it as a single line that both declares and initializes it. It’s more obvious, and you’re less likely to ever miss initializing a pointer that way.