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 8394749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:08:11+00:00 2026-06-09T20:08:11+00:00

432 void RoleExternModel::getShareConfig(SourceList& sourceList, std::vector<UInt16>& packs, ShopModel& shopModel) 433 { 434 std::copy(Packs, Packs +

  • 0
   432     void RoleExternModel::getShareConfig(SourceList& sourceList, std::vector<UInt16>& packs, ShopModel& shopModel)
   433     {
   434         std::copy(Packs, Packs + SHARE_PRIZE, std::insert_iterator<std::vector<UInt16> >(packs, packs.begin()));
   435         struct Fun {
   436             std::vector<std::pair<UInt16, UInt8> > pairs;
   437             void operator () (UInt16 type) {
   438                 pairs.push_back(std::make_pair<UInt16, UInt8>(type, Configuration::PACKS));
   439             }
   440         };
   441         Fun fun();
   442         std::for_each(Packs, Packs + SHARE_PRIZE, fun);
   443         shopModel shopModel(fun.pairs);
   444         shopModel.load(sourceList);
   445     }

why the compiler said :

error: non-local function
‘Pet::RoleExternModel::getShareConfig(Pet::SourceList&,
std::vector >&,
Pet::ShopModel&)::Fun Pet::fun()’ uses local type
‘Pet::RoleExternModel::getShareConfig(Pet::SourceList&,
std::vector >&,
Pet::ShopModel&)::Fun’

how to make it legel?

  • 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-09T20:08:13+00:00Added an answer on June 9, 2026 at 8:08 pm

    This line is the problem:

    Fun fun();
    

    It declares a function names fun that takes no arguments and returns a Fun object.

    This is called the most vexing parse.

    Remove the parentheses and you declare an object named fun instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<ListBox Height=434 HorizontalAlignment=Left Margin=6,238,0,0 Name=listBox1 VerticalAlignment=Top Width=432 DataContext={Binding}> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text={Binding Name}
String url = mysite.com/index.php?name=john&id=432 How can I extract the id parameter (432)? it can
So I've built a custom array of users like such: [[user1,432],[user1,53],[user9,58],[user5,75],[user3,62]] I want to
So I have an array of numbers that look something like 1,708,234 2,802,532 11,083,432
I have two variables, the first is 1D flow vector containing 230 data and
<ListBox Name=listBoxButtons Height=700> <ListBox.ItemTemplate> <DataTemplate> <Border Background={StaticResource PhoneAccentBrush} Name=border Width=432 Height=62 Margin=6 Padding=12,0,0,6> <TextBlock
My 3D data is stored in a .txt file as the following 3423.432 4353.23
I have a file download servlet running on Tomcat, the code is public void
i am working with a very large data set (786,432 rows to be precise).
02-18 00:02:08.432: ERROR/PackageManager(57): Package com.example.brown requires unavailable shared library com.google.android.maps; failing! I got this

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.