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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:55:03+00:00 2026-06-09T04:55:03+00:00

Possible Duplicate: const CFoo &bar() const Which is the meaning of this line? virtual

  • 0

Possible Duplicate:
const CFoo &bar() const

Which is the meaning of this line?

virtual void Encode (KDataStream & stream) const;

What´s the meaning of const at the end in C++?

  • 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-09T04:55:04+00:00Added an answer on June 9, 2026 at 4:55 am

    Which is the meaning of this line?

    virtual void Encode (KDataStream & stream) const;
    

    It’s a statement that declares a function.

    virtual means it’s a member function that can be overridden by a function of the same name and compatible parameter and return types declared in a class derived from this one. The correct version will be chosen (at run-time, if necessary) according to the type of the object it’s invoked on.

    void means it doesn’t return anything.

    Encode is the name of the function.

    ( marks the start of the parameter list.

    KDataStream is the type of the first parameter.

    & means the parameter is passed by reference.

    stream is the name given to the parameter; it serves as documentation, but can be left out of the declaration without changing the meaning.

    ) marks the end of the parameter list.

    const means that it’s a member function that can’t modify non-static, non-mutable data members of the object it’s invoked on. It also allows it to be invoked on objects that are declared const.

    ; marks the end of the statement.

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

Sidebar

Related Questions

Possible Duplicate: C#: Static readonly vs const Which is preferable in this instance (no
Possible Duplicate: const and global This code will produce error in c++ // Foo.cpp
Possible Duplicate: behaviour of const_cast I need to understand what this line means char
Possible Duplicate: Deleting a pointer to const (T const*) void operator delete (void*); ...
Possible Duplicate: Use of 'const' for function parameters For example, void Func(int para); If
Possible Duplicate: Why aren't static const floats allowed? Is there any reason why this
Possible Duplicate: String literals vs const char* in C Why i can do this?
Possible Duplicate: What is the meaning of a const at end of a member
Possible Duplicate: Convert std::string to const char* or char* void setVersion(char* buf, std::string version)
Possible Duplicate: Convert std::string to const char* or char* i've got a line from

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.