0

Possible Duplicate:
C++: const reference, before vs after type-specifier

Any different between these two definitions.

 1.   void foo(Animal const& dog){}

 2.   void foo(const Animal& dog){} 
Community
  • 1
  • 1
Nayana Adassuriya
  • 23,596
  • 30
  • 104
  • 147
  • 1
    also [Why do some people prefer “T const&” over “const T&”?](http://stackoverflow.com/questions/2640446/why-do-some-people-prefer-t-const-over-const-t) – LihO Oct 15 '12 at 13:15
  • @LihO : Ohoo sorry. I searched for previous post. but couldn't find. anyway thank you. – Nayana Adassuriya Oct 15 '12 at 13:15

0 Answers0