Page 6 of 6 FirstFirst ... 456
Results 51 to 52 of 52

Thread: Algoritms

  1. Top | #51
    Super Moderator
    Join Date
    Sep 2000
    Location
    Nevada
    Posts
    23,767
    Archived
    96,752
    Total Posts
    120,519
    Rep Power
    94
    Quote Originally Posted by lpetrich View Post
    One does not have to use *all* of C++. Just whatever one finds convenient in it.

    Looking at the above example, why write
    #define INVERT -1

    when one can write
    const int INVERT = -1;

    ?
    Look how smart I can look with the preprocessor.

    If my code is hard to understand it shows I'm a better programmer than you.

  2. Top | #52
    Veteran Member
    Join Date
    Nov 2017
    Location
    seattle
    Posts
    4,555
    Rep Power
    11
    https://en.wikipedia.org/wiki/C%2B%2B_classes

    A short intro to C++. If you are doing a lot of math you can overload existing operators, change usage, along with creating your own operators.

    The class is the foundation of C++.

    A good reference site.

    [url]https://www.tutorialspoint.com/cplusplus/cpp_preprocessor.htm[/u

    All C++ programs are composed of the following two fundamental elements −

    Program statements (code) − This is the part of a program that performs actions and they are called functions.


    Program data − The data is the information of the program which gets affected by the program functions.


    Encapsulation is an Object Oriented Programming concept that binds together the data and functions that manipulate the data, and that keeps both safe from outside interference and misuse. Data encapsulation led to the important OOP concept of data hiding.
    Last edited by steve_bank; 02-12-2019 at 05:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •