Wednesday, April 11, 2012

C++ Classes with Static functions

// -------//   A.h    //------//
class A{
    public:
    static void abc();
};



// -------//   A.cc    //------//

#include <iostream>
using namespace std;

#include "A.h"
void A::abc(){
    cout<<"abc"<<endl;
}

// -------//   A.cc    //------//

#include <iostream>
using namespace std;
#include "A.h"
A b;
int main(){
    A::abc();
    b.abc();
}
     

 Compile as:
g++ main.cc A.cc
./a.out

Monday, August 6, 2007

A new concept is coming up in modern science: Everything is made up of the same thing.  More and more scientists are trying to improve this theory. They say it to be 'String theory'. The most fundamental thing is a string and every 'thing' is vibrating string. According to the Vedic tradition, every 'thing' manifests from Primordial Energy symbolised by Om. Doesn't they refer to the same thing ?