R
Razvan
Hi !
Today I saw some code like this:
struct foo {
foo(foo* s2){
cout << "foo::foo";
}
};
foo* foo(foo *s2)
{
cout << "foo:foo*)";
return s2;
}
The name of the struct is 'foo' and the name of the
function is 'foo' also ! Why they are not conflicting ? The name of
types and the names of functions (and varialbles) are kept in separate
places ? Is this standard behaviour ?
Regards,
Razvan
Today I saw some code like this:
struct foo {
foo(foo* s2){
cout << "foo::foo";
}
};
foo* foo(foo *s2)
{
cout << "foo:foo*)";
return s2;
}
The name of the struct is 'foo' and the name of the
function is 'foo' also ! Why they are not conflicting ? The name of
types and the names of functions (and varialbles) are kept in separate
places ? Is this standard behaviour ?
Regards,
Razvan