7th c++ Problem

see the code
#include
#include
class demo
{
private:
int no;
public:
void get_no()
{
cin>>no;
}
void process_no() const
{
no=4;
}
void display()
{
cout<Can you explain me what and why for this code?

Please don't use compiler for answering this!!!

Replies

  • Manish Goyal
    Manish Goyal
    what happened guys?
    63 views but no replies..........
    should i give you the answer..?cummon guys I dont't think that this is that much tough as compared to previous problems.
  • krunal_p
    krunal_p
    Here,

    When we use a Const symbol,
    that method becomes a Read Only Structure..


    So it will give a Compile time error.

    😉
  • Manish Goyal
    Manish Goyal
    correct ...Krunal
    and welcome to ce
  • krunal_p
    krunal_p
    Does we have any Java related Threads..?
  • Manish Goyal
    Manish Goyal
    Yes we have java related threads like this

    #-Link-Snipped-#

    If you have any problem related to java then you can post it in appropriate section

    Procedure for posting you can get it from here

    #-Link-Snipped-#
  • krunal_p
    krunal_p
    Thanks............😁
  • Manish Goyal
    Manish Goyal
    You are welcome krunal
    have your active participation here.I am sure you will learn a lot

You are reading an archived discussion.

Related Posts

Well all of the c++ programmers know about it's well known feature operator overloading but can anyone explain me. 1:-Why we can't overload ternary operator,sizeof(),.(dot) operator?why? 2:-what is difference between...
Questions like these are normal in common competitive exams. They use just school level mathematics but used to measure someone's analyzing, reasoning & inferring capabilities. So give your head some...
:smile😁o prison buses have emergency exits? When lightning strikes the ocean why don't all the fish die? Do you yawn in your sleep? Why are dogs noses always wet? Do...
In winter season, when we cover ourself with a blanket, we feel hot. But when we cover ourself with with 2 blankets we feel much hotter. What's the reason?😁
I heard about the starting the website. If I developed a site using j2ee, what are the other things do I need to setup? How can I increase the security...