Checking for Qt… configure: error: Qt (>= Qt 3.0) (headers and libraries) not found. Please check your installation!(Ubuntu)

Qt (>= Qt 3.0) (headers and libraries)”(Ubuntu 8.04)

sudo apt-get install kde-devel

How to install package for Debian (apt-get install packagename)

Here is the command to install package in Debian

 

apt-get install packagename

if you have problem to download the packages from the internet, please check your file /etc/apt/sources.list

Beginner for Qt programming, simple example for pushbutton/QPushButton

//here is the very simple example for qt programming

//how to run the code,

//first copy the code and save as hello.cpp or whatever name that you prefer

//in the same directory,

//===============================

//how to compile hello.cpp

//type: qmake -projrect

//type: qmake

//then type: make

//================================

#include <QApplication>
#include <QPushButton>

int main(int argc, char *argv[])
{

QApplication app(argc, argv);
QPushButton hello(“Hello World”);
hello.click();
hello.show();

return app.exec();
}

Difference between Pagerank 0 and N/A

Hello guys,

I have seen a lot of guys confused about the Difference between Pagerank 0 and N/A! So I deciced to make a post on it.

So what does Pagerank 0 exactly mean?

Pagerank 0 means google has assigned pagerank to the website but due to less quality of backlinks its been given a pagerank 0.

I’m stuck on Pagerank 0 what to do?

This is another question I came across, Basically what you have to do to get a good pagerank is build more and more quality backlinks. If you need more information on Link Building read my blog :)

I’m stuck at Pagerank N/A what to do?

In most of the cases when you have pagerank N/A it means that your blog is very new(Less than 3 months). Again, to get a good pagerank you will also have to build links to gain a good pagerank.

All the best to everyone… thats all for today on topic Difference between Pagerank 0 and N/A

Regards,

How to check BackLink in Google

Here is the better command to check back link in Google

theboox.com -site: theboox.com -site: theboox.com

replace theboox.com to your website URL.

please don’t forget the colon(:) after the ‘-site’

Toronto classified

Toronto classified

Nike Air Max

Nike Air Max
Nike Air Max 90
Nike Air Max 180
Nike Air Max 360

c++ Polymorphism

// pointers to base class
#include <iostream>
using namespace std;

class CPolygon {
  protected:
    int width, height;
  public:
    void set_values (int a, int b)
      { width=a; height=b; }
  };

class CRectangle: public CPolygon {
  public:
    int area ()
      { return (width * height); }
  };

class CTriangle: public CPolygon {
  public:
    int area ()
      { return (width * height / 2); }
  };

int main () {
  CRectangle rect;
  CTriangle trgl;
  CPolygon * ppoly1 = &rect;
  CPolygon * ppoly2 = &trgl;
  ppoly1->set_values (4,5);
  ppoly2->set_values (4,5);
  cout << rect.area() << endl;
  cout << trgl.area() << endl;
  return 0;
}

how to use function pointer to replace switch-statment, C/C++ tutorial

1.1  What is a Function Pointer?

Function Pointers are pointers, i.e. variables, which point to the address of a function. You must keep in mind, that a running program gets a certain space in the main-memory. Both, the executable compiled program code and the used variables, are put inside this memory. Thus a function in the program code is, like e.g. a character field, nothing else than an address. It is only important how you, or better your compiler/processor, interpret the memory a pointer points to.


1.2  Introductory Example or How to Replace a Switch-Statement

When you want to call a function DoIt() at a certain point called label in your program, you just put the call of the function DoIt() at the point label in your source code. Then you compile your code and every time your program comes up to the point label, your function is called. Everything is ok. But what can you do, if you don’t know at build-time which function has got to be called? What do you do, when you want to decide it at runtime? Maybe you want to use a so called Callback-Function or you want to select one function out of a pool of possible functions. However you can also solve the latter problem using a switch-statement, where you call the functions just like you want it, in the different branches. But there’s still another way: Use a function pointer!

In the following example we regard the task to perform one of the four basic arithmetic operations. The task is first solved using a switch-statement. Then it is shown, how the same can be done using a function pointer. It’s only an example and the task is so easy that I suppose nobody will ever use a function pointer for it ;-)


//------------------------------------------------------------------------------------
// 1.2 Introductory Example or How to Replace a Switch-Statement
// Task: Perform one of the four basic arithmetic operations specified by the
//       characters '+', '-', '*' or '/'.

// The four arithmetic operations ... one of these functions is selected
// at runtime with a swicth or a function pointer
float Plus    (float a, float b) { return a+b; }
float Minus   (float a, float b) { return a-b; }
float Multiply(float a, float b) { return a*b; }
float Divide  (float a, float b) { return a/b; }

// Solution with a switch-statement - <opCode> specifies which operation to execute
void Switch(float a, float b, char opCode)
{
   float result;

   // execute operation
   switch(opCode)
   {
      case '+' : result = Plus     (a, b); break;
      case '-' : result = Minus    (a, b); break;
      case '*' : result = Multiply (a, b); break;
      case '/' : result = Divide   (a, b); break;
   }

   cout << "Switch: 2+5=" << result << endl;         // display result
}

// Solution with a function pointer - <pt2Func> is a function pointer and points to
// a function which takes two floats and returns a float. The function pointer
// "specifies" which operation shall be executed.
void Switch_With_Function_Pointer(float a, float b, float (*pt2Func)(float, float))
{
   float result = pt2Func(a, b);    // call using function pointer

   cout << "Switch replaced by function pointer: 2-5=";  // display result
   cout << result << endl;
}

// Execute example code
void Replace_A_Switch()
{
   cout << endl << "Executing function 'Replace_A_Switch'" << endl;

   Switch(2, 5, /* '+' specifies function 'Plus' to be executed */ '+');
   Switch_With_Function_Pointer(2, 5, /* pointer to function 'Minus' */ &Minus);
}