Constructors n deconstructors!
This program Shows you how the constructors and deconstructors work !!!
This is a simple illustration of why the destructors work opposite to the direction of constructors...!!!..more
Comparing Popular Programming Languages
Comparing Programming Languages
There are several ways to compare computer Languages but for simplicity
we'll compare then by Compilation Method and Abstraction Level. Compiling to Mach..more
CPP Function Pointers
Function Pointers Definition:
Function Pointers are pointers, That is variables, which point to the address of a function. You must keep in mind, that a running program..more
Type Casting
Type Casting
Converting an expression of a given type into another type is known as type-casting. We have already seen some ways to t..more
Cpp - Virtual Destructors
Destructors :
Destructor is a member function,which gets called when the object goes out of scope.
That is all cleanups and final step of class destruction is done in ..more
Fundamentals of File Input and Output
The File Stream Classes in the iostream Library
The class hierarchy on the opposite page shows that the file stream classes contain the stream c..more
what is memory leak?how to avoid that?
Memory leaks in C++ and how to avoid them
A memory leak is what happens when you forget to free a block of memory allocated with the new operator
or when you make it impossible to do so. As a con..more
Website blocker
This is a simple program to block specific websites on you computer.
It is compatible with XP and Vista.
You can unblock them at your will...
Thank you
Abhinandan
Contact me at abhi.agarwal281295@gmail.com
String finder
This is a simpler program to find a string in other number of strings.
The return value will be the number of strings found similar, their position and the string itself!!!
cantact me at abhi.agarwal281295@gmail.com
Cpp executable disabler
This program is designed to corrupt the autoexec file int system root.
This file is important to run the c++ (16 bit) executables.
So first make a copy of the file "%systemroot%\system32\autoexec.nt" and then proce
USB Blocker
This program is for disabling your USB port usually to protect your computer from viruses that come from USB Flash drive.
You can enable the port at your will!
Screen Saver using SDL
Screen Saver using SDL sample tutorials
program:
void putClone(void)
{
int i=0,j=0,k=0;
if (SDL_LockSurface(screen) < 0)
return;
if(Mx < Sx1)
Mx++;
else
Mx--;
if(My < Sy1)
AutoMouse
This is a program that records your mouse and plays it back at will- for more info
check the readme included in the project.
C++ Programming Book
This book serves as the introduction to C++. It teaches how to program in C++ and how to properly use its
features.
The maximum valid value proved experimentally
This is a program to find the maximum valid value that an unsigned long variable can handle. While running this program be patient as the loop will find all the possible values of the variable until the variable increment is stopped!
It may take 5-6..more
Decimal to Octal
#include
#include
void main()
{
clrscr();
coutdec;
for (int i=1;dec!=0;i*=10)
{
oct=oct+((dec%8)*i);
dec/=8;
}
cout..more
Polymorphism - Sample tutorials
/* A base class of Shape gives rise to
two derived classes - Circle and Square.
An application called Polygon sets up an
array of Circles and Squares, and uses a
getarea method to find the area of each.
This getarea method is defined as a..more
Cpp - Type Casting-Explicit Conversion
#include
using namespace std;
class Base
{
float i,j;
};
class Addition
{
int x,y;
public:
Addition (int a, int b)
{
x=a; y=b;
}
int result()
{
return x+y;
}
};
int main ()
{
Base d;
A..more
Cpp - Dynamic Casting
#include
#include
using namespace std;
class Base
{
virtual void dummy() {}
};
class Derived: public Base
{
int a;
};
int main ()
{
try
{
Base * bptrD = new Derived;
Base * bptrB = new B..more
Cpp - Pointers to Functions
#include
using namespace std;
int add (int a, int b)
{
return (a+b);
}
int subtract(int a, int b)
{
return (a-b);
}
int operation (int x, int y, int (*functocall)(int,int))
{
int g;
g = (*functocall)(x,y);
r..more
Cpp - Array of Structures
#include
#include
#include
using namespace std;
#define numbooks 3
struct books {
string title;
int year;
} bookstore [numbooks];
void printbooks (books book);
int main ()
{
string mystr;
int..more
Cpp - Pointers to Structures
#include
#include
#include
using namespace std;
struct Books {
string title;
int year;
};
int main ()
{
string mystr;
Books book1;
Books * bookptr;
bookptr = &book1;
cout ..more
Cpp - Friend Functions
#include <iostream>
using namespace std;
class Base
{
int width, height;
public:
void setvalues (int, int);
int area () ..more
Cpp - Friend classes
#include <iostream>
using namespace std;
class Sqr;
class Rectangle
{
int width, height;
public:
int area ()
..more
Cpp - Access a Class Member Function Without Creating a Clas
In some cases, it is possible to call a class member
function without creating the class object.
In the following example, the program will
print "hello world" although class A has never been
created. When the program enters the "PrintMe"
f..more
Threads without threads
Let me start by talking about this paradoxial
title: "Threads" without threads. I have
deliberately chosen such a confusing article so
that you don't think something like "Oh, I already
know how t..
C++ Pointers to the functions: Interview Ques
Explain the use of this pointer.
Explain what happens when a pointer is deleted twice?
What is a smart pointer?
Do inline functions improve performance. Explain.
What is the difference between an ..
Turbo C,C++ Compiler Free Download
You can download TurboC compiler(TC) for free.
Euphoria is a high-level programming language with several features that set it apart:
* Euphoria programs run on Windows, DOS, and Linux.
..
C++ ADO
I’m often asked for a HowTo tutorial on using ADO
with C++. It is highly likely that I’ve
written more ADO with C++ than anybody on the
planet. I often talk about how nice it is
to do database pro..
Cpp Resizing an image
I'm back with an other problem in my program. I
load an interleaved raw image with 8 bit RGB and,
as previously suggested in this forum, i load it
with this code:..
Cpp - Destructors examples
Destructors are usually used to deallocate memory
and do other cleanup for a class object and its
class members when the object is destroyed. A
destructor is called for a class object when that
ob..
Cpp - cpp CSC interview questions
1.what are the problems you face when calling a C
function from C++ function ? How to avoid that?
'Extern C'
{
#include
}..
Cpp - gtk packages for windows
Packages
You will need to get the GLib, Cairo, Pango, ATK,
GTK+, gettext-runtime, libpng, libjpeg, libtiff
and zlib developer packages to build against GTK+,
and the corresponding runtime packag..
Cpp - ICE ( Internet Communications Engine)
Ice, the Internet Communications Engine, is
middleware for the practical programmer. A
high-performance Internet communications platform,
Ice includes a wealth of layered services and
plug-ins. Ic..
What is public, protected, private?
class A() { }; int main() { A a; } Whether there
will be a default contructor provided by the
compiler in above case ? ..
In some cases, it is possible to call a class
member
function without creating the class object.
In the following example, the program will
print "hello world" although class A has never
been
..
Answer in about two minutes. Avoid details,
don’t ramble. Touch on these four areas:
* How many years, doing what function
* Education – credentials
* Major responsibility and accomplishments
* Personal sum..