Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is being declared here?

Tags:

c++

constants

I came across this strange looking declaration in some code early this morning (before my cup of black coffee had had a chance to "kick in") ...

IField const* f(0);

That looks a bit unusual to me. Can anyone explain what the variable f is?

like image 549
oompahloompah Avatar asked Feb 28 '26 05:02

oompahloompah


1 Answers

It's a pointer 'f' of type IField const (or const IField) that is initialized to 0. Same as for instance: const IField *f = 0;

like image 117
Tore Olsen Avatar answered Mar 01 '26 17:03

Tore Olsen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!