Google

Tuesday, March 18, 2008

HOW TO RENAME RECYCLE BIN


If you want to rename the Recycle Bin to something else like Trash, Waste, Shredder, etc then these steps will make it easy to do so:

1: open run
2: in run..type: regedit
3: a screen will appear
4: go for first map:hkey_classes_root
5: there search for: clsid open it
6: in that there will be 645ff.... etc click here
7: see right side
8: there is localized string
9: double click
10: copy the text that is:
11: @% System Root%\system32\shell32.dll,-8964 save the text somewhere
12: then delete the text and write the name which u want for your recycle bin
13: refresh
14: if u want it back like it was ,just go to the string and paste the text you've copied

Saturday, March 15, 2008

WHY DOES C/C++ GIVE BETTER RUN-TIME PERFORMANCE THAN JAVA?

Java is completely based on OOP’s that mean the whole java technology is work on the concept of Java Virtual Machine that is JVM that is main part of java compile, that acts as translators of byte code into machine language and compile the code. The work of JVM converts the Java byte codes into platform specific machine language that is the main concept of java. Java technology is high-level, object-oriented, very robust programming language. Java is platform independent programming language and you can run your compiled code on any machine without recompiling your source code

Although java is very robust language but c and c++ give better run time performance than java:

That’s because the Java bytecode is interpreted, not compiled. Programs written in C are compiled into binaries which can be executed by a specific computer processor. Programs
written in Java require one more step — they must be interpreted by the Java “virtual machine” before running. As a result, a computer running a Java program has to execute more
machine-language instructions to do the same amount of work than a computer running an equivalent program written in C.

Friday, March 14, 2008

CONSTRUCTOR CAN NOT BE VIRTUAL WHILE DESTRUCTOR CAN BE.

A constructor is a special member function whose task is to initialize the object.
In particular, "virtual" allows us to call a function knowing only an interfaces and not the exact type of the object. To create an object you need complete information. In particular, you need to know the exact type of what you want to create. Consequently, a "call to a constructor" cannot be virtual.

destructor is used to destroy the objects that have been created by a constructor
It is possible for the destructor to be virtual because the object already knows what type it is(whereas it doesn't during construction). and once the object has been created,its VPTR is initialized, so virtual function call can take place.

Wednesday, March 12, 2008

WHAT ARE THE THINGS WHICH ARE ALLOWED IN C AND C++ BUT WITH DIFFERENT MEANINGS

Some incompatibilities unavoidably arose between C and C++ .They are:


1:

C specifies that a variable declared with a constant qualifier is not a modifiable object and in C it is an external linkage.

ex:

  const int           i = 4;  // External linkage
extern const int j = 7; // 'extern' optional
static const int k = 8; // 'static' required

C++ specifies that a Constant object with file scope has internal linkage by default, meaning that the object's name is not visible outside the source file in which it is declared

ex:

 const int           i = 4;  // Internal linkage
extern const int j = 7; // 'extern' required
static const int k = 8; // 'static' optional
2:

sizeof (’1′) == sizeof (int) in C; but it is sizeof (char) in C++.

3:

C does not allow a given typedef to appear more than once in the same scope.

C++ handles typedefs and type names differently than C, and allows redundant occurrences of a given typedef within the same scope.

Thus the following code is valid in C++ but invalid in C:

ex:

typedef int i
typedef int i; // Valid C++, invalid C


4:


Nested structure types may be declared within other structures.
The scope of the inner structure tag extends outside the scope of the
outer structure in C,but does not do so in C++.Structure declarations possess their own scope in C++
ex:
struct Outer
{
struct Inner // Nested structure declaration
{
int a;
float f;
} in;

enum E // Nested enum type declaration
{
UKNOWN, OFF, ON
} state;
};

struct Inner si; // Nested type is visible in C,
// Not visible in C++

enum E et; // Nested type is visible in C,
// Not visible in C++