Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. what does "rhs" mean?

what does "rhs" mean?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++linuxtutoriallearning
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bash
    wrote on last edited by
    #1

    Hi, I recently started learning pure C++ and want to know what does "rhs" mean? For example: class MyClass { public: MyClass& operator=(const MyClass& rhs); }; I've investigated that "rhs" is frequently-used in operator overloaders in C++ classes. What is "rhs"? May I use another word (for example, "dog") instead "rhs"? Sorry for stupid question. Yours sincerely, Alex Bash

    T H 2 Replies Last reply
    0
    • B Bash

      Hi, I recently started learning pure C++ and want to know what does "rhs" mean? For example: class MyClass { public: MyClass& operator=(const MyClass& rhs); }; I've investigated that "rhs" is frequently-used in operator overloaders in C++ classes. What is "rhs"? May I use another word (for example, "dog") instead "rhs"? Sorry for stupid question. Yours sincerely, Alex Bash

      T Offline
      T Offline
      TFrancis
      wrote on last edited by
      #2

      rhs = Right Hand Side. And yes, you can use anything you want, but rhs is normally used because it does a good job of describing the fact that the parameter will be on the right hand side of the = sign. Tim

      1 Reply Last reply
      0
      • B Bash

        Hi, I recently started learning pure C++ and want to know what does "rhs" mean? For example: class MyClass { public: MyClass& operator=(const MyClass& rhs); }; I've investigated that "rhs" is frequently-used in operator overloaders in C++ classes. What is "rhs"? May I use another word (for example, "dog") instead "rhs"? Sorry for stupid question. Yours sincerely, Alex Bash

        H Offline
        H Offline
        hph
        wrote on last edited by
        #3

        hi, "rhs" is just the name of the input parameter, you can also use "cat" if you want, but only if you like cats ;-) Have a nice day! hph

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups