Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8308063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:41:11+00:00 2026-06-08T18:41:11+00:00

I am getting this error when I compile with GCC: error: declaration of ‘static

  • 0

I am getting this error when I compile with GCC:

error: declaration of 'static int utils::StringUtils::SplitString(const std::string&, const std::string&, std::vector<std::basic_string<char> >&, bool)' outside of class is not definition

Code:

Header:

namespace utils
{
    /*
    *   This class provides static String utilities based on STL library.
    */
    class StringUtils
    {
    public:
        /**
        *   Splits the string based on the given delimiter.
        *   Reference: http://www.codeproject.com/Articles/1114/STL-Split-String
        */
        static int SplitString( const std::string&              input, 
                                const std::string&              delimiter,
                                std::vector<std::string>&       results, 
                                bool includeEmpties =           true );
    };
};

Source:

namespace utils
{
    int StringUtils::SplitString(   const std::string&          input, 
                                    const std::string&          delimiter,
                                    std::vector<std::string>&   results, 
                                    bool                        includeEmpties );
    {
    ....
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:41:14+00:00Added an answer on June 8, 2026 at 6:41 pm

    I believe you need to lose that semicolon in your source file. Should be:

    namespace utils
    {
        int StringUtils::SplitString(   const std::string&          input, 
                                        const std::string&          delimiter,
                                        std::vector<std::string>&   results, 
                                        bool                        includeEmpties ) // <--- No more semi-colon!
        {
        ....
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting this error during compile time (g++ 4.4.6): main.cpp: In function ‘int
Can anyone explain why I'm getting this compile error? Duplicate 'Rad.Core.Aop.MethodArgumentValidation' attribute E:\Scripting\Rad.Core\Properties\AssemblyInfo.cs This
Trying to compile a iPhone/iPad application with SDK3.2 and am getting this error: Undefined
I'm trying to compile the next code, but I'm getting this error on the
Im getting this linker error that won't let me compile. It only happens on
I am getting this weird RunTime error. The classes compile easy on eclipse but
I'm getting a nothing to repeat error when I try to compile this: search
I'm getting the following compile error in one of my classes, using gcc 3.4.5
I have been getting a strange error when I use gcc to compile my
I'm getting a totally bizzare error trying to compile a C program using GCC.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.