Thread: Clarification on '::' definition and 'tilda' symbol

  1. #1
    Registered User
    Join Date
    Mar 2002

    Question Clarification on '::' definition and 'tilda' symbol

    // Various include files
    #include "RetCodes.h"
    #include "BeltMsg.h"
    #include "QPager.h"
    // #include "wheresub.h"
    #include "y2k.h"
    #include "Ymdhms.h"
    #include "TimeRep.h"
    #include "TimeStamp.h"
    #include "Duration.h"

    // Definition of the maximum length of a CUBE computer page
    const int MAX_COMP_PAGE = 256;

    BeltMsg::BeltMsg() : DBScript() //What does the '::' mean?

    BeltMsg::~BeltMsg() //What does '~' in front of BeltMsg mean?

    int BeltMsg::Run()
    Origin or;
    Magnitude mag;
    qpager_data_type qpage;
    char belttext[MAX_COMP_PAGE];

    // Get the origin
    or = (*(;

    // Get the magnitude
    mag = (*(or.mags.begin()));

    // Initialize the QPager routines
    QInit(townfile, faultfile);

    // Create and send pages
    strcpy(qpage.message_type, "Event");
    qpage.event_id = event.evid;
    strcpy(qpage.data_source, "Pasadena");
    qpage.event_version = nmod;

    // Create ymdhms from the eqtime.long()
    struct ymdhms localtim;
    struct ymdhms gmttim;
    Last edited by hugo; 03-13-2002 at 03:40 PM.

  2. #2
    Registered User bljonk's Avatar
    Join Date
    Oct 2001

    Wrong Address Dude!

    goto: C++_programming_board

    Do not try this at home alone *(spague code)

    defining something *(method) from class x
    Ünicode¬>world = 10.0£

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    ~function( ); //denotes that this is a 'destructor' function.

    :: is basicly used to tell us that the function we're defining belongs to the class to the left of the ::. Example:

    MyClass::MyFunction( ) {


    Function 'MyFunction' belongs to 'MyClass'.

    And yes, you're in the wrong place. The C++ board is what you want.

    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed