Bangladesh doesn't support the most popular internet transfer medium paypal still now. So Bangladeshi Freelancers facing problems in paypal transaction. Thinking about paypal solution in bangladesh. You can trust on Paypal Bangladesh . Paypal bangladesh is a reliable and instant organization of Bangladesh providing paypal solution.
C C++ Source Codes, C C++ Practical examples ,C C++ tutorial ,Your best resource for Learning C and C++
Tuesday, December 21, 2010
Paypal in Bangladesh
Monday, December 20, 2010
cbulk link partners
Web Design | Web Development | Mobile Applications
At Kinsh Technologies, we are aware how important it is to have a successful business. We implement web-solutions as well as software development for you to match your business needs. Joomla, Wordpress, Drupal, Magento, Zen-Cart, OS-Commerce, PHP, Dot Net Technologies, Mobile Technologies are the areas of our expertise and we assure quality and timely work.
SEO Indian Experts - Search Engine Optimization Services and Online Marketing
Read more: http://www.seoindianexperts.com
Read more: http://www.seoindianexperts.com
Tuesday, December 7, 2010
Useful link,article and source code directories
Millions of peoples are trying to get traffic to their websites and spending lots of money in this. Submit article to article directory is a good and popular way of getting SEO and traffic to website.There are lots of paid article directories available in web but a very few free. This software give you chance to submit your article to world's best free article directory article.ognilab.com totally free of cost.
Submit Your article to world's best free article directory
Submit Your article to world's best free article directory
This softwre can help you to find your most needed C,C++ source code from the C,C++ source code directory cprogram.org.You can also submit your source code in web to spread and test your knowledge on programming.Submit C,C++ source code to this directory to make it rich with source code and welfare of other programmers.
Millions of peoples are trying to get traffic to their websites and spending lots of money in this. Submit website link to Web directory is a good and popular way of getting SEO and traffic to website.There are lots of paid web directories available in web but a very few free. This software give you chance to submit your website link to world's best free web directory dir.ognilab.com totally free of cost.
Thursday, October 28, 2010
ogni software tools ,locker,fixer download
Ognilab is a open source free tools software company. It has already delivered some popular freewares. This software tools can be downloaded from following award winning links
Play Free Flash Game Racing Test Master online
Click Here Play Free Flash Game Racing Test Master Online
Monday, October 4, 2010
C,C++ Tutorial : Unions
generally of different types, at different times. Declaring a union is similar to
declaring a structure. Its general form is
declaring a structure. Its general form is
union union-type-name {
type member-name;
type member-name;
type member-name;
} union-variables;
For example:
union u_type {
int i;
char ch;
};
This declaration does not create any variables. You may declare a variable either
by placing its name at the end of the declaration or by using a separate declaration
statement. In C, to declare a union variable called cnvt of type u_type using the
definition just given, write
union u_type cnvt;
When declaring union variables in C++, you need use only the type name—
you don't need to precede it with the keyword union. For example, this is how
cnvt is declared in C++:
u_type cnvt;
In C++, preceding this declaration with the keyword union is allowed, but redundant.
In C++, the name of a union defines a complete type name. In C, a union name is its
tag and it must be preceded by the keyword union. (This is similar to the situation
with structures described earlier.) However, since the programs in this chapter are
valid for both C and C++, the C-style declaration form will be used.
In cnvt, both integer i and character ch share the same memory location. Of
course, i occupies 2 bytes (assuming 2-byte integers) and ch uses only 1. Figure 7-2
shows how i and ch share the same address. At any point in your program, you can
refer to the data stored in a cnvt as either an integer or a character.
When a union variable is declared, the compiler automatically allocates enough
storage to hold the largest member of the union. For example (assuming 2-byte
integers), cnvt is 2 bytes long so that it can hold i, even though ch requires only
1 byte.
To access a member of a union, use the same syntax that you would use for
structures: the dot and arrow operators. If you are operating on the union directly,
use the dot operator. If the union is accessed through a pointer, use the arrow
operator. For example, to assign the integer 10 to element i of cnvt, write
cnvt.i = 10;
In the next example, a pointer to cnvt is passed to a function:
void func1(union u_type *un)
{
un->i = 10; /* assign 10 to cnvt using
function */
}
Using a union can aid in the production of machine-independent (portable)
code. Because the compiler keeps track of the actual sizes of the union members,
no unnecessary machine dependencies are produced. That is, you need not worry
about the size of an int, long, float, or whatever.
Unions are used frequently when specialized type conversions are needed
because you can refer to the data held in the union in fundamentally different
ways. For example, you may use a union to manipulate the bytes that comprise a
double in order to alter its precision or to perform some unusual type of rounding.To get an idea of the usefulness of a union when nonstandard type conversions
are needed, consider the problem of writing a short integer to a disk file. The C/C++
standard library defines no function specifically designed to write a short integer to
a file. While you can write any type of data to a file using fwrite(), using fwrite()
incurs excessive overhead for such a simple operation. However, using a union you
can easily create a function called putw() , which writes the binary representation of
a short integer to a file one byte at a time. (This example assumes that short integers
are 2 bytes long.) To see how, first create a union consisting of one short integer and
a 2-byte character array:
union pw {
short int i;
char ch[2];
};
Now, you can use pw to create the version of putw() shown in the following program.
#include <stdio.h>
union pw {
short int i;
char ch[2];
};
int putw(short int num, FILE *fp);
int main(void)
{
FILE *fp;
fp = fopen("test.tmp", "wb+");
putw(1000, fp); /* write the value 1000 as an integer */
fclose(fp);
return 0;
}
int putw(short int num, FILE *fp)
{
union pw word;word.i = num;
putc(word.ch[0], fp); /* write first half */
return putc(word.ch[1], fp); /* write second half */
}
Although putw() is called with a short integer, it can still use the standard function
putc() to write each byte in the integer to a disk file one byte at a time.
structures: the dot and arrow operators. If you are operating on the union directly,
use the dot operator. If the union is accessed through a pointer, use the arrow
operator. For example, to assign the integer 10 to element i of cnvt, write
cnvt.i = 10;
In the next example, a pointer to cnvt is passed to a function:
void func1(union u_type *un)
{
un->i = 10; /* assign 10 to cnvt using
function */
}
Using a union can aid in the production of machine-independent (portable)
code. Because the compiler keeps track of the actual sizes of the union members,
no unnecessary machine dependencies are produced. That is, you need not worry
about the size of an int, long, float, or whatever.
Unions are used frequently when specialized type conversions are needed
because you can refer to the data held in the union in fundamentally different
ways. For example, you may use a union to manipulate the bytes that comprise a
double in order to alter its precision or to perform some unusual type of rounding.To get an idea of the usefulness of a union when nonstandard type conversions
are needed, consider the problem of writing a short integer to a disk file. The C/C++
standard library defines no function specifically designed to write a short integer to
a file. While you can write any type of data to a file using fwrite(), using fwrite()
incurs excessive overhead for such a simple operation. However, using a union you
can easily create a function called putw() , which writes the binary representation of
a short integer to a file one byte at a time. (This example assumes that short integers
are 2 bytes long.) To see how, first create a union consisting of one short integer and
a 2-byte character array:
union pw {
short int i;
char ch[2];
};
Now, you can use pw to create the version of putw() shown in the following program.
#include <stdio.h>
union pw {
short int i;
char ch[2];
};
int putw(short int num, FILE *fp);
int main(void)
{
FILE *fp;
fp = fopen("test.tmp", "wb+");
putw(1000, fp); /* write the value 1000 as an integer */
fclose(fp);
return 0;
}
int putw(short int num, FILE *fp)
{
union pw word;word.i = num;
putc(word.ch[0], fp); /* write first half */
return putc(word.ch[1], fp); /* write second half */
}
Although putw() is called with a short integer, it can still use the standard function
putc() to write each byte in the integer to a disk file one byte at a time.
**Note :C++ supports a special type of union called an anonymous union which is
discussed in Part Two of this book.
discussed in Part Two of this book.
Subscribe to:
Posts (Atom)