Friday, January 8, 2010

C++ Videos

Hi all

Today we saw basic C++ program. With cout and cin. Try different simple examples using these statements.

Someone asked me about the stream buffer :

Base buffer class for streams
streambuf objects are in charge of providing reading and writing functionality to/from certain types of character sequences, such as external files or strings.

streambuf objects are usually associated with one specific character sequence, from which they read and write data through an internal memory buffer. The buffer is an array in memory which is expected to be synchronized when needed with the physical content of the associated character sequence.


for more information check site http://www.cplusplus.com/reference/iostream/streambuf/

There are also videos for learning C++ are available on site

Also you can see there are graphics videos available.
These are freely downloadable.

One more thing

New C++ Reserved Words

C++ reserves some words for its own use in the libraries. These words have special “meaning” to the compiler and therefore can not be used as identifiers in a declaration statement. Reserved words are classified into three categories:

C++ Keywords
asm auto bool break case
catch char class const const_cast
continue default delete do double
dynamic_cast else enum explicit export
extern false float for friend
goto if inline int long
mutable namespace new operator private
protected public register reinterpret_cast
return short signed sizeof static
static_cast struct switch template this
throw true try typedef typeid
typename union unsigned using virtual
void volatile wchar_t while

Alternative Tokens
Alternative tokens are the equivalences of operators at the right side of the following list.

Token Meaning
and &&
and_eq &=
bitand &
bitor |
compl ~
not !
not_e !=
or ||
or_eq |=
xor ^
xor_eq ^=

C++ Library Reserved Names
There are a number of identifiers that are already in use in C++ libraries, if incidentally used by the programmer may result in unpredictable behavior of the program. That is, it might generate compiler error, warning, incorrect result/outcome or maybe the program just run well.
For example, C++ reserves names beginning with two underscores or a single underscore followed by an uppercase letter and names beginning with a single underscore for use as global variable. Therefore, avoid creating identifier such as __param or _Param in your program.
Another example is identifier sin is already defined in math library. If you want to use, i.e., include, the math library in your program, avoid declaring a function with the same name sin, although the compiler has the capability of distinguishing it through the use of function signature.

Good Night and take care

1 comment: