Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should put these two functions in a separate CPP file? #1

Open
NewbieGuan opened this issue Dec 8, 2021 · 0 comments
Open

Should put these two functions in a separate CPP file? #1

NewbieGuan opened this issue Dec 8, 2021 · 0 comments

Comments

@NewbieGuan
Copy link

NewbieGuan commented Dec 8, 2021

Hello, there was a problem when I included the file "scl.h" directly in my project:"Find one or more multidefined symbols".
Then I put these two functions in a separate CPP file, and solved this problem:

#include "SCL.h"

namespace scl
{
    //functions to return iterators for a given config_file (range-based for loops)
    config_file::iterator begin(config_file &file)
    {
        return file.begin();
    }

    config_file::iterator end(config_file &file)
    {
        return file.end();
    }
}

So should the definitions of these two functions be separated for normal use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant