Jump to content

Bhaskar

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Bhaskar

  • Rank
    Newbie

Previous Fields

  • First Name:
    Bhaskar
  • Gender:
    Male
  • Town/City:
    Kathmandu
  • Subject:
    Computer Science
  • Current University/College:
    TU
  • District:
    Sunsari
  • Village/Town:
    Dharan
  • High School:
    Secondary Boarding School
  • Surname:
    Shrestha
  1. QUOTE (rs_1915 @ Jul 19 2004, 06:18 PM) Bhaskar, u think C++ syntax is ugly or language itself is ugly?? could u explain bit more and what languages u like the most? i noticed u r CS major. C as said by its creator is an elegant programming language. I agree with that. The syntax of C++ is elegant too. But people make it ugly. Writing hard to read programs is often easy in C and C++. I believe in writing readable programs. The language that I like most is without doubt C and C++.
  2. C++ does allow you to create a pointer to a non-static class member. See the code below class foo { int num; public: foo(int n); int Square(); }; foo::foo(int n) : num(n) { } int foo::Square() { return num*num; } main() { foo o(10); foo *po = &o; // declare a pointer to class member function int (foo::*func)(); // initialize the function pointer func = &foo::Square; // call through an object cout // call through a pointer to an object cout *func)() }
  3. I think it is ugliness, rather than beauty of C.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.