0

Say I have a file file1.h:

namespace a
{
     int Func()
    {
        return 5;
    }
}

and a file file2.h

#include "file1.h"

namespace a
{
    class Foo
    {
        Foo();
    };
}

and file2.cpp:

#include "file2.h"

a::Foo::Foo()
{
    Func();//<----
}

Can Func() be referenced like this, or do we need to do a::Func()?

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by CoolGamer48
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.