use of var

F

Fernando A. Gómez F.

Ajay said:
var reminds me of void* in C/C++. Unless there are advantages of using
it, I wouldnt use it.

Would it be like the auto keyword from C++0x?
 
P

Pavel Minaev

Would it be like the auto keyword from C++0x?

It is precisely the same as plain "auto" in C++0x. It's more
restrictive, too - can only be used at local scope (C++0x auto works
for members, too), and you can't do partial inference (i.e. no
equivalent to e.g. "auto* x = &y").
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top