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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:57:39+00:00 2026-06-11T04:57:39+00:00

The function is defined as static bool foo(const std::string& iVariable); belongs to Class A.

  • 0

The function is defined as static bool foo(const std::string& iVariable); belongs to Class A.
When I use if (A::foo(Var)), I found that the return value of A::foo(Var) will not change,I use it in many places, and Var is changed. So does it mean that the return value of A::foo(Var) will be fix, after the first time I use it? Thanks a lot!

  • 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-11T04:57:40+00:00Added an answer on June 11, 2026 at 4:57 am

    Look at the documentation of A::foo and see if it says it ignores the argument after the first call. If it does say that, then you shouldn’t expect the return value to change. If it doesn’t say that, then you should expect the value to change in some way depending on the input and maybe other things that the documentation will hopefully tell you.

    Of course the documentation could be wrong or misleading, in which case a look at the source code could clarify this.

    If there is no documentation, I suggest you talk to the author of the code.

    If you are the author, you may have some work to do.

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

Sidebar

Related Questions

I have a function defined like this: public static void ShowAbout(Point location, bool stripSystemAssemblies
I have this user defined function. public partial class UserDefinedFunctions { static int i;
Suppose I have a function defined like this: class Foo() { public: void bar(MyClass*
i have a function defined as follows: void AddHeadCode(std::ofstream &ostream, size_t length){ ostream.write((char*)length, sizeof(length));
#include <cstdlib> template<class A> struct Foo { template<class B> static bool Bar(); }; template<class
I was told that a function defined as static in one .c file is
I have the following function defined inside my linked list class. The declaration in
Consider this trivial function: public static bool IsPositive(IComparable<int> value) { return value.CompareTo(0) > 0;
I want to define a function template<typename T> T constCast(const ScriptVar_t& s); . Depending
I have a hash map defined as class KeyType { int key; mutable bool

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.