HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM Blog
 Search:     
TUTORIALS
 ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
  Search Engine Optimization/SEO
  E-Commerce
  Interview Questions
C and C++ >> Miscellaneous
video cropper Scripts in Miscellaneous (2)Active News Manager Scripts in Miscellaneous (5)
OOPS concept Scripts in Miscellaneous (2)C++ Tutorials Scripts in Miscellaneous (12)
My Favorite Uploader
Discription:

   FavUploader is a ActiveX Favorite Uploader written by Visual C++ and MFC. It aims to make your personal blog site featured, so that your client can share their favorite easily.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 1Rating: 1
wmWeatherApp
Discription:

   This is a simple dockapp for WindowMaker (and other OPENSTEP like window managers) to display an image of the current weather conditions for a specified zip code. See http://www.php-geeks.com/ wmWeatherApp.jpg for a screenshot.
FreePlateform(s): Linux,FreeBSDUpdate: 10/10/200Vistor Rating: 1Rating: 1
C++ Spell checker
Discription:

   This is a simple free c plus plus spell checker, It reads a file and finds all the wrong words in it.
FreePlateform(s): Linux,WindowUpdate: 10/10/200Vistor Rating: 2Rating: 1
HS Invoice Manager
Discription:

   HS Invoice Manager 1.0 is an invoicing application for small business. It allows a user to Issue and Print Professional Invoices, Credit Notes, Account Statements, Price Lists and Control Product Stock. KEY FEATURES: - Maintain customer account list, track account balances - Issue product and service invoices, credit notes, statements - Record payments on customer accounts - View Sales Activity, View and print any saved transaction
CommercialPlateform(s): WindowUpdate: 10/10/200Vistor Rating: 4Rating: 3
Calculate Latitude and Longitude from Rate Center V&H in C/C++
Discription:

   This function calculates the latitude and longitude coordinates from Vertical and Horizontal (V&H) coordinates. V&H's are used to identify locations and hence relative distances between network elements and between rate centers listed in AreaCodeWorld(tm) Gold Edition. This sample code is provided to database subscribers "AS IS" without warranty of any kind.
CommercialPlateform(s): Linux,Window,FreeBSD,Mac OSX,Sun SolorisUpdate: 10/10/200Vistor Rating: 3Rating: 1
Spriteworks
Discription:

   Spriteworks v1.0 is a 100% original sprite/graphics library containing 2,000 sprites and animation sequences for use in game programming, Java, shockwave, multimedia authoring and hundreds of other uses. Registration comes with two free bonus products and access to our large Sound Effects Library containing everything you need to bring your games to life!.
CommercialPlateform(s): Window,Mac OSXUpdate: 10/10/200Vistor Rating: 4Rating: 1
Clear Screen Function
Discription:

   This function uses the Windows API to clear a console screen, and is useful for when the standard system("cls") is unavailable.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 4Rating: 3
Output Macro
Discription:

   This macro allows you to output to the standard cout stream and an ofstream of your choice, allowing for convenience and efficiency.
FreePlateform(s): Linux,WindowUpdate: 10/10/200Vistor Rating: 2Rating: 5
2SMS
Discription:

   2SMS checks your mailboxes, when you leaving computer, and sends notifications about new messages onto your mobile by sms. You may setup leave timeout, mailbox access settings, sms sending. Unlimited mailboxes support.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 2Rating: 4
SecuKEEPER
Discription:

   Secure data with all-in-one encryption, offer four types of encryption protection for data at various security levels, can rapidly lock files and folders, can hide files within other file so they're not even visible, can strongly encrypt any data, optionally making them selfdecrypting so they can be opened on a system that doesn't have secukeeper, private coffer feature creates encrypted virtual disk in which can store any data, also offer password manager and password generator. furthermore. v2.6 News: 1.Super Mouse-Right-Button. 2.Custom Mouse-Right-Button by yourself. 2.Optimized the speed of encryption & decryption process. 3.Supported auto-check update. 4.Offered more shortcut-key.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 1Rating: 3
AGInstaller
Discription:

   AGInstaller is a script-based tool that creates professional setups. It has the gentleman's set of features such as multilanguage support, numerous dialogs, an uninstaller, registry and INI modification, Start Menu shortcuts, files compression and more. Setups can be packed into one SFX setup file for easy distribution. The size of the extractor module is only 46k overhead over compressed data size.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 1Rating: 1
Copy Path To Clipboard
Discription:

   This simple console application copies the path of the current working directory to the Windows clipboard. When a parameter is given, it is added to the end of the path.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 4Rating: 2
Copy Path To Clipboard
Discription:

   This simple console application copies the path of the current working directory to the Windows clipboard. When a parameter is given, it is added to the end of the path.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 2Rating: 2
Kill Process
Discription:

   This program, released under GPL, is similar to the UNIX kill command, but it requires the name of the process and it runs under Win32. With the Task Manager you can easily find the process' name (it is called
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 1Rating: 3
Tech Helper's Help
Discription:

   This program allows you to copy the whole content of a text file to the Windows clipboard. It's a great help if you work a lot with texts stored in files. The original idea came from a friend, who works as tech. helper, and he has to send e-mails all day to clients. He has some template answers, but until now he had top open these files, select the whole text, and copy their content to the clipboard. With this prg. it can be much more simple: just associate a file extension (for instance .ccc) with this program, and then double-click on a text file (which has this extension). Its content will be copied automatically to the clipboard.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 3Rating: 4
eNom Snap Domain Names Name Grabber Script
Discription:

   eNom Domain Grabber is a fully automated domain name registration program that sends registration attempts to the registrar eNom. The user simply has to put what domain names they want to try and "grab" and the software will do the rest! Users can input a start and end time, or select for automated registration submissions to start immediately. All domains are registered in the eNom account specified within the software. Now anyone can attempt to get high-class domain names when they expire!
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 4Rating: 3
ls
Discription:

   Just a simple clone of the command 'ls' that is found on linux/unix for use on windows.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 2Rating: 2
Inrova Numero Base
Discription:

   This software is a multipurpose calculator with advanced features such as a quadratic,simultaneous equation solvers. Other features include all trigonmetirc functions,logarithms and one click operations. This version also has a statistics box.
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 4Rating: 2
NTC
Discription:

   With NTC you can allow your visitors to download the program and use on their computer to search for and download mp3 music, videos and much more through the Gnuttella network (same as Bear Share and Morpheus).
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 2Rating: 1
NTC
Discription:

   With NTC you can allow your visitors to download the program and use on their computer to search for and download mp3 music, videos and much more through the Gnuttella network (same as Bear Share and Morpheus).
FreePlateform(s): WindowUpdate: 10/10/200Vistor Rating: 1Rating: 2
filterif
Discription:

   filterif filters lines of text from standard input to standard output. Each argument passed to filterif is matched against the input received. When a match is found, the current input is discarded. When a match is not found, the input passes to standard output.
FreePlateform(s): OtherUpdate: 10/10/200Vistor Rating: 2Rating: 1
What's New in Visual C++ .NET 2003
Discription:

   Visual C++ .NET 2003 represents the most significant update to the product in many years! Come learn about all new ISO standards-conforming language features, enhanced optimizations, and Windows Forms support for C++.
Plateform(s): n/aUpdate: 2/4/2007 Vistor Rating: 3Rating: 2
LTFCrypt
Discription:

   Would you like to use C++ to build your own file encryption program? This real-world example source code package contains a fully functional program that encrypts and decrypts text or binary files. This is an easy way for you to learn how to use Visual C++ with LibTomCrypt, a public domain and an ISO C cryptography library, to build your own file encryption program. Supported ciphers: aes, blowfish, xtea, rc5, rc6, safer+, twofish, safer-k64, safer-sk64, safer-k128, safer-sk128, rc2, des, 3des, cast5, noekeon, skipjack, khazad, and anubis. In this example source codes, the symmetric block cipher chaining mode used is CTR (Counter Mode). However, LibTomCrypt also has support for other modes such as CFB, OFB, ECB, CBC.
commercialPlateform(s): WindowUpdate: 2/4/2007 Vistor Rating: 1Rating: 2
Microsoft Analysis Services Training
Discription:

   This free training covers all the topics you need to learn in order to become master in MSAS along with the screen shots and sample code with step by step instructions. Please visit the site for the details on the topcs covered. Introduction to Data Warehousing and OLAP, Introducing Data Warehousing, Introducing Analysis Manager Wizards, Understanding Analysis Services Architecture, Building Dimensions Using the Dimension Editor, Using Advanced Dimension Settings, Working with Cubes and Measures, Managing Storage and Optimization, Processing Dimensions and Cubes. Managing Partitions, Implementing Calculations Using MDX, Working with Virtual Cubes, Using Actions, Drillthrough and Writeback, and Implementing Security.
commercialPlateform(s): WindowUpdate: 2/5/2007 Vistor Rating: 2Rating: 3
Referral Spam with C#
Discription:

   How to write a referal spam application. Its a good introduction to web browser control and C# in general.
Plateform(s): WindowUpdate: 2/7/2007 Vistor Rating: 1Rating: 3
R-Word Recovery
Discription:

   R-Word is Microsoft Word Document Recovery software that extracts text even from heavily damaged *.doc files. The recovered documents can be saved as Word *.doc or plain text *.txt files.
Plateform(s): WindowUpdate: 2/8/2007 Vistor Rating: 1Rating: 3
R-UNDELETE File Recovery Software
Discription:

   R-Undelete is file recovery and undelete tool for FAT, NTFS file systems. It recovers files on local logical disks when files were: removed without Recycle Bin; removed by virus attack or power failure; removed when Recycle Bin has been emptied.
Plateform(s): WindowUpdate: 2/8/2007 Vistor Rating: 2Rating: 3
R-Wipe & Clean - Disk Wipe, File Eraser and PC privacy
Discription:

   Complete solution to wipe hard disk, clean private records such as temporary internet files, history, cookies, autocomplete forms and passwords, recently opened documents list, Explorer MRUs, temporary files, etc. and free up disk space.
Plateform(s): WindowUpdate: 2/8/2007 Vistor Rating: 2Rating: 4
System Information 1.1 component
Discription:

   System Information 1.1 component, incorporates an ability to read the wide range of computer and system's characteristics for windows 2000/2003 and Windows XP family.
Plateform(s): WindowUpdate: 2/8/2007 Vistor Rating: 3Rating: 5
Bokai Barcode ActiveX Control (Barcode/ActiveX)
Discription:

   Bokai barcode ActiveX control is an barcode control that can be used to develop applications or dropped directly into a Microsoft Office document (Word, Excel, etc.) or Access Report. It can also copy barcode images to the Clipboard.
Plateform(s): WindowUpdate: 2/8/2007 Vistor Rating: 1Rating: 3
AKIRA
Discription:

   AKIRA is a run-time C multithreading and clusterable environment able to execute Software Agents and a web/system development platform to model their behaviour. The system core is made up of a server daemon that answers to network programming and AI computation requests and that executes Agent's instances. A programming interface based on a C MACRO LANGUAGE and some automated scripts that allows to create new Agents complete the boundle. The whole system is written in C with an exstensive use of templates and design patterns and integrates different C open source software, implementing various aspects of the framework. Two soft computing technologies are provided, Fuzzy Logic and Fuzzy Cognitive Maps, together with an high level psychologically valid Goal Oriented Programming Language: BDI (Belief Desire Intention) Model.
Plateform(s): WindowUpdate: 6/16/2007Vistor Rating: 4Rating: 2
TrialCard Kitting Application
Discription:

   Automation of medical prescription procedure by scanning medical cards. Card validation is secure and automatic. 3 types of medical cards are included into a kit: Member Card, Assignment Card and Case. Possible customization of the solution according to your requirements.
Plateform(s): WindowUpdate: 6/16/2007Vistor Rating: 1Rating: 2
AbiWord
Discription:

   AbiWord is a Windows compatible free word processing program similar to Microsoft® Word that is suitable for typing papers, letters, reports, memos, and more.
Plateform(s): WindowUpdate: 6/16/2007Vistor Rating: 1Rating: 2
Count Instances of Process or Application in C/C++
Discription:

   This article describes how to count the number of instances of a process that are currently running on the system. It is written in C++ for Windows, but could be ported to other systems and languages easily. (Linux, Visual Basic/VB, C, Unix, MacOS) The system just needs to support interprocess semaphores. The idea can be extended to count any resource, such as a thread, file, data structure, or network object.
1.0.0Plateform(s): WindowUpdate: 9/28/2007Vistor Rating: 4Rating: 1
The basics of C
Discription:

   C is a programming language of many different dialects, similar to the way that each spoken language has many different dialects. In C, dialects don't exist because the speakers live in the North or South. Instead, they're there because there are many different compilers that support slightly different features. There are several common compilers: in particular, Borland C++, Microsoft C++, and GNU C. There are also many front-end environments for the different compilers--the most common is Dev-C++ around GNU's G++ compiler. Some, such as GCC, are free, while others are not. Please see the compiler listing for more information on how to get a compiler and set it up. You should note that if you are programming in C on a C++ compiler, then you will want to make sure that your compiler attempts to compile C instead of C++ to avoid small compatability issues in later tutorials.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 2Rating: 1
If statements
Discription:

   The ability to control the flow of your program, letting it make decisions on what code to execute, is valuable to the programmer. The if statement allows you to control if a program enters a section of code or not based on whether a given condition is true or false. One of the important functions of the if statement is that it allows the program to select an action based upon the user's input. For example, by using an if statement to check a user-entered password, your program can decide whether a user is allowed access to the program.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 1Rating: 1
Loops
Discription:

   Loops are used to repeat a block of code. Being able to have your program repeatedly execute a block of code is one of the most basic but useful tasks in programming -- many programs or websites that produce extremely complex output (such as a message board) are really only executing a single task many times. (They may be executing a small number of tasks, but in principle, to produce a list of messages only requires repeating the operation of reading in some data and displaying it.) Now, think about what this means: a loop lets you write a very simple statement to produce a significantly greater result simply by repetition.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 4Rating: 1
Functions
Discription:

   Functions that a programmer writes will generally require a prototype. Just like a blueprint, the prototype gives basic structural information: it tells the compiler what the function will return, what the function will be called, as well as what arguments the function can be passed. When I say that the function returns a value, I mean that the function can be used in the same manner as a variable would be. For example, a variable can be set equal to a function that returns a value between zero and four.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 1Rating: 1
switch case
Discription:

   Switch case statements are a substitute for long if statements that compare a variable to several "integral" values ("integral" values are simply values that can be expressed as an integer, such as the value of a char). The basic format for using switch case is outlined below. The value of the variable given into switch is compared to the value following each of the cases, and when one value matches the value of the variable, the computer continues executing the program from that point.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 2Rating: 1
An introduction to pointers
Discription:

   Pointers are an extremely powerful programming tool. They can make some things much easier, help improve your program's efficiency, and even allow you to handle unlimited amounts of data. For example, using pointers is one way to have a function modify a variable passed to it. It is also possible to use pointers to dynamically allocate memory, which means that you can write programs that can handle nearly unlimited amounts of data on the fly--you don't need to know, when you write the program, how much memory you need. Wow, that's kind of cool. Actually, it's very cool, as we'll see in some of the next tutorials. For now, let's just get a basic handle on what pointers are and how you use them.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 1Rating: 1
Structures
Discription:

   When programming, it is often convenient to have a single name with which to refer to a group of a related values. Structures provide a way of storing many different values in variables of potentially different types under the same name. This makes it a more modular program, which is easier to modify because its design makes things more compact. Structs are generally useful whenever a lot of data needs to be grouped together--for instance, they can be used to hold records from a database or to store information about contacts in an address book. In the contacts example, a struct could be used that would hold all of the information about a single contact--name, address, phone number, and so forth.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 2Rating: 1
Arrays
Discription:

   Arrays are useful critters that often show up when it would be convenient to have one name for a group of variables of the same type that can be accessed by a numerical index. For example, a tic-tac-toe board can be held in an array and each element of the tic-tac-toe board can easily be accessed by its position (the upper left might be position 0 and the lower right position 8). At heart, arrays are essentially a way to store many values under the same name. You can make an array out of any data-type including structures and classes.
4.1Plateform(s): WindowUpdate: 3/29/2009Vistor Rating: 3Rating: 1
C Strings
Discription:

   Note that along with C-style strings, which are arrays, there are also string literals, such as "this". In reality, both of these string types are merely just collections of characters sitting next to each other in memory. The only difference is that you cannot modify string literals, whereas you can modify arrays. Functions that take a C-style string will be just as happy to accept string literals unless they modify the string (in which case your program will crash). Some things that might look like strings are not strings; in particular, a character inclosed in single quotes, like this, 'a', is not a string. It's a single character, which can be assigned to a specific location in a string, but which cannot be treated as a string. (Remember how arrays act like pointers when passed into functions? Characters don't, so if you pass a single character into a function, it won't work; the function is expecting a char*, not a char.)
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
C File I/O and Binary File I/O
Discription:

   When accessing files through C, the first necessity is to have a way to access the files. For C File I/O you need to use a FILE pointer, which will let the program keep track of the file being accessed. (You can think of it as the memory address of the file or the location of the file).
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 3Rating: 1
Typecasting
Discription:

   Typecasting is a way to make a variable of one type, such as an int, act like another type, such as a char, for one single operation. To typecast something, simply put the type of variable you want the actual variable to act as inside parentheses in front of the actual variable. (char)a will make 'a' function as a char.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
Accepting command line arguments
Discription:

   n C it is possible to accept command line arguments. Command-line arguments are given after the name of a program in command-line operating systems like DOS or Linux, and are passed in to the program from the operating system. To use command line arguments in your program, you must first understand the full declaration of the main function, which previously has accepted no arguments. In fact, main can actually accept two arguments: one argument is number of command line arguments, and the other argument is a full list of all of the command line arguments.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
Singly linked lists
Discription:

   Linked lists are a way to store data with structures so that the programmer can automatically create a new place to store data whenever necessary. Specifically, the programmer writes a struct definition that contains variables holding information about something and that has a pointer to a struct of its same type (it has to be a pointer--otherwise, every time an element was created, it would create a new element, infinitely). Each of these individual structs or classes in the list is commonly known as a node or element of the list.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 3Rating: 1
Recursion
Discription:

   Recursion is a programming technique that allows the programmer to express operations in terms of themselves. In C++, this takes the form of a function that calls itself. A useful way to think of recursive functions is to imagine them as a process being performed where one of the instructions is to "repeat the process". This makes it sound very similar to a loop because it repeats the same code, and in some ways it is similar to looping. On the other hand, recursion makes it easier to express ideas in which the result of the recursive call is necessary to complete the task. Of course, it must be possible for the "process" to sometimes be completed without the recursive call. One simple example is the idea of building a wall that is ten feet high; if I want to build a ten foot high wall, then I will first build a 9 foot high wall, and then add an extra foot of bricks. Conceptually, this is like saying the "build wall" function takes a height and if that height is greater than one, first calls itself to build a lower wall, and then adds one a foot of bricks.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
Functions with variable-length argument lists
Discription:

   Perhaps you would like to have a function that will accept any number of values and then return the average. You don't know how many arguments will be passed in to the function. One way you could make the function would be to accept a pointer to an array. Another way would be to write a function that can take any number of arguments. So you could write avg(4, 12.2, 23.3, 33.3, 12.1); or you could write avg(2, 2.3, 34.4); The advantage of this approach is that it's much easier to change the code if you want to change the number of arguments. Indeed, some library functions can accept a variable list of arguments (such as printf--I bet you've been wondering how that works!).
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
Binary Trees
Discription:

   The binary tree is a fundamental data structure used in computer science. The binary tree is a useful data structure for rapidly storing sorted data and rapidly retrieving stored data. A binary tree is composed of parent nodes, or leaves, each of which stores data and also links to up to two other child nodes (leaves) which can be visualized spatially as below the first node with one placed to the left and with one placed to the right. It is the relationship between the leaves linked to and the linking leaf, also known as the parent node, which makes the binary tree such an efficient data structure. It is the leaf on the left which has a lesser key value (ie, the value used to search for a leaf in the tree), and it is the leaf on the right which has an equal or greater key value. As a result, the leaves on the farthest left of the tree have the lowest values, whereas the leaves on the right of the tree have the greatest values. More importantly, as each leaf connects to two other leaves, it is the beginning of a new, smaller, binary tree. Due to this nature, it is possible to easily access and insert data in a binary tree using search and insert functions recursively called on successive leaves.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
The basics of C++
Discription:

   The very first thing you need to do, before starting out in C++, is to make sure that you have a compiler. What is a compiler, you ask? A compiler turns the program that you write into a executable that your computer can actually understand and run. If you're taking a course, you probably have one provided through your school. If you're starting out on your own, your best bet is to use Code::Blocks. Our page on setting up Code::Blocks will take you through setting up the Code::Blocks compiler in great detail.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
If statements
Discription:

   The ability to control the flow of your program, letting it make decisions on what code to execute, is valuable to the programmer. The if statement allows you to control if a program enters a section of code or not based on whether a given condition is true or false. One of the important functions of the if statement is that it allows the program to select an action based upon the user's input. For example, by using an if statement to check a user entered password, your program can decide whether a user is allowed access to the program.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
Loops
Discription:

   Loops are used to repeat a block of code. Being able to have your program repeatedly execute a block of code is one of the most basic but useful tasks in programming -- many programs or websites that produce extremely complex output (such as a message board) are really only executing a single task many times. (They may be executing a small number of tasks, but in principle, to produce a list of messages only requires repeating the operation of reading in some data and displaying it.) Now, think about what this means: a loop lets you write a very simple statement to produce a significantly greater result simply by repetition.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 3Rating: 1
Functions
Discription:

   Functions that a programmer writes will generally require a prototype. Just like a blueprint, the prototype tells the compiler what the function will return, what the function will be called, as well as what arguments the function can be passed. When I say that the function returns a value, I mean that the function can be used in the same manner as a variable would be. For example, a variable can be set equal to a function that returns a value between zero and four.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
switch case
Discription:

   Switch case statements are a substitute for long if statements that compare a variable to several "integral" values ("integral" values are simply values that can be expressed as an integer, such as the value of a char). The basic format for using switch case is outlined below. The value of the variable given into switch is compared to the value following each of the cases, and when one value matches the value of the variable, the computer continues executing the program from that point.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
An introduction to pointers
Discription:

   Pointers are an extremely powerful programming tool. They can make some things much easier, help improve your program's efficiency, and even allow you to handle unlimited amounts of data. For example, using pointers is one way to have a function modify a variable passed to it. It is also possible to use pointers to dynamically allocate memory, which means that you can write programs that can handle nearly unlimited amounts of data on the fly--you don't need to know, when you write the program, how much memory you need. Wow, that's kind of cool. Actually, it's very cool, as we'll see in some of the next tutorials. For now, let's just get a basic handle on what pointers are and how you use them.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
Structures
Discription:

   Before discussing classes, this lesson will be an introduction to data structures similar to classes. Structures are a way of storing many different values in variables of potentially different types under the same name. This makes it a more modular program, which is easier to modify because its design makes things more compact. Structs are generally useful whenever a lot of data needs to be grouped together--for instance, they can be used to hold records from a database or to store information about contacts in an address book. In the contacts example, a struct could be used that would hold all of the information about a single contact--name, address, phone number, and so forth.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
Array basics
Discription:

   Arrays are useful critters because they can be used in many ways. For example, a tic-tac-toe board can be held in an array. Arrays are essentially a way to store many values under the same name. You can make an array out of any data-type including structures and classes.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
C Strings
Discription:

   In C++ there are two types of strings, C-style strings, and C++-style strings. This lesson will discuss C-style strings. C-style strings are really arrays, but there are some different functions that are used for strings, like adding to strings, finding the length of strings, and also of checking to see if strings match. The definition of a string would be anything that contains more than one character strung together. For example, "This" is a string. However, single characters will not be strings, though they can be used as strings.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
Introduction to Classes
Discription:

   C++ is a bunch of small additions to C, with a few major additions. One major addition is the object-oriented approach (the other addition is support for generic programming, which we'll cover later). As the name object-oriented programming suggests, this approach deals with objects. Of course, these are not real-life objects themselves. Instead, these objects are the essential definitions of real world objects. Classes are collections of data related to a single object type. Classes not only include information regarding the real world object, but also functions to access the data, and classes possess the ability to inherit from other classes. (Inheritance is covered in a later lesson.) If a class is a house, then the functions will be the doors and the variables will be the items inside the house. The functions usually will be the only way to modify the variables in this structure, and they are usually the only way even to access the variables in this structure. This might seem silly at first, but the idea to make programs more modular - the principle itself is called "encapsulation". The key idea is that the outside world doesn't need to know exactly what data is stored inside the class--it just needs to know which functions it can use to access that data. This allows the implementation to change more easily because nobody should have to rely on it except the class itself.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
More on Functions
Discription:

   In lesson 4 you were given the basic information on functions. However, I left out one item of interest. That item is the inline function. Inline functions are not very important, but it is good to understand them. The basic idea is to save time at a cost in space. Inline functions are a lot like a placeholder. Once you define an inline function, using the 'inline' keyword, whenever you call that function the compiler will replace the function call with the actual code from the function.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 3Rating: 1
Accepting command line arguments
Discription:

   In C++ it is possible to accept command line arguments. Command-line arguments are given after the name of a program in command-line operating systems like DOS or Linux, and are passed in to the program from the operating system. To use command line arguments in your program, you must first understand the full declaration of the main function, which previously has accepted no arguments. In fact, main can actually accept two arguments: one argument is number of command line arguments, and the other argument is a full list of all of the command line arguments.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
Singly linked lists
Discription:

   Linked lists are a way to store data with structures so that the programmer can automatically create a new place to store data whenever necessary. Specifically, the programmer writes a struct or class definition that contains variables holding information about something, and then has a pointer to a struct of its type. Each of these individual struct or classes in the list is commonly known as a node.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
Recursion
Discription:

   Recursion is a programming technique that allows the programmer to express operations in terms of themselves. In C++, this takes the form of a function that calls itself. A useful way to think of recursive functions is to imagine them as a process being performed where one of the instructions is to "repeat the process". This makes it sound very similar to a loop because it repeats the same code, and in some ways it is similar to looping. On the other hand, recursion makes it easier to express ideas in which the result of the recursive call is necessary to complete the task. Of course, it must be possible for the "process" to sometimes be completed without the recursive call. One simple example is the idea of building a wall that is ten feet high; if I want to build a ten foot high wall, then I will first build a 9 foot high wall, and then add an extra foot of bricks. Conceptually, this is like saying the "build wall" function takes a height and if that height is greater than one, first calls itself to build a lower wall, and then adds one a foot of bricks.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 1Rating: 1
Functions with variable-length argument lists
Discription:

   Perhaps you would like to have a function that will accept any number of values and then return the average. You don't know how many arguments will be passed in to the function. One way you could make the function would be to accept a pointer to an array. Another way would be to write a function that can take any number of arguments. So you could write avg(4, 12.2, 23.3, 33.3, 12.1); or you could write avg(2, 2.3, 34.4); Some library functions can accept a variable list of arguments (such as the venerable printf).
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
Binary Trees
Discription:

   The binary tree is a fundamental data structure used in computer science. The binary tree is a useful data structure for rapidly storing sorted data and rapidly retrieving stored data. A binary tree is composed of parent nodes, or leaves, each of which stores data and also links to up to two other child nodes (leaves) which can be visualized spatially as below the first node with one placed to the left and with one placed to the right. It is the relationship between the leaves linked to and the linking leaf, also known as the parent node, which makes the binary tree such an efficient data structure. It is the leaf on the left which has a lesser key value (ie, the value used to search for a leaf in the tree), and it is the leaf on the right which has an equal or greater key value. As a result, the leaves on the farthest left of the tree have the lowest values, whereas the leaves on the right of the tree have the greatest values. More importantly, as each leaf connects to two other leaves, it is the beginning of a new, smaller, binary tree. Due to this nature, it is possible to easily access and insert data in a binary tree using search and insert functions recursively called on successive leaves.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
Inheritance - An Overview
Discription:

   The ability to use the object-oriented programming is an important feature of C++. Lesson 12 introduced the idea of the class; if you have not read it and do not know the basic details of classes, you should read it before continuing this tutorial. Inheritance is an important feature of classes; in fact, it is integral to the idea of object oriented programming. Inheritance allows you to create a hierarchy of classes, with various classes of more specific natures inheriting the general aspects of more generalized classes. In this way, it is possible to structure a program starting with abstract ideas that are then implemented by specific classes. For example, you might have a class Animal from which class dog and cat inherent the traits that are general to all animals; at the same time, each of those classes will have attributes specific to the animal dog or cat.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
Inheritance - Syntax
Discription:

   The syntax to denote one class as inheriting from another is simple. It looks like the following: class Bear : public Animal, in place of simply the keyword class and then the class name. The ": public base_class_name" is the essential syntax of inheritance; the function of this syntax is that the class will contain all public and protected variables of the base class. Do not confuse the idea of a derived class having access to data members of a base class and specific instances of the derived class possessing data. The data members - variables and functions - possessed by the derived class are specific to the type of class, not to each individual object of that type. So, two different Bear objects, while having the same member variables and functions, may have different information stored in their variables; furthermore, if there is a class Animal with an object, say object BigAnimal, of that type, and not of a more specific type inherited from that class, those two bears will not have access to the data within BigAnimal. They will simply possess variables and functions with the same name and of the same type.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
Understanding Initialization Lists in C++
Discription:

   In C++, whenever an object of a class is created, its constructor is called. But that's not all--its parent class constructor is called, as are the constructors for all objects that belong to the class. By default, the constructors invoked are the default ("no-argument") constructors. Moreover, all of these constructors are called before the class's own constructor is called.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 3Rating: 1
Class Design in C++
Discription:

   When you're designing a class in C++, the first thing you should decide is the public interface for the class. The public interface determines how your class will be used by other programmers (or you), and once designed and implemented it should generally stay pretty constant. You may decide to add to the interface, but once you've started using the class, it will be hard to remove functions from the public interface (unless they aren't used and weren't necessary in the first place). But that doesn't mean that you should include more functionality in your class than necessary just so that you can later decide what to remove from the interface. If you do this, you'll just make the class harder to use. People will ask questions like, "why are there four ways of doing this? Which one is better? How can I choose between them?" It's usually easier to keep things simple and provide one way of doing each thing unless there's a compelling reason why your class should offer multiple methods with the same basic functionality.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 2Rating: 1
Enumerated Types - enums
Discription:

   Sometimes as programmers we want to express the idea that a variable will be used for a specific purpose and should only be able to have a small number of values--for instance, a variable that stores the current direction of the wind might only need to store values corresponding to north, south, east, and west.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
Formatting Cout Output in C++ using iomanip
Discription:

   Creating cleanly formatted output is a common programming requirement--it improves your user interface and makes it easier to read any debugging messages that you might print to the screen. In C, formatted output works via the printf statement, but in C++, you can create nicely formatted output to streams such as cout. This tutorial covers a set of basic I/O manipulations possible in C++ from the iomanip header file. Note that all of the functions in the iomanip header are inside the std namespace, so you will need to either prefix your calls with "std::" or put "using namespace std;" before using the functions.
4.1Plateform(s): WindowUpdate: 3/30/2009Vistor Rating: 4Rating: 1
Getting Random Values in C and C++ with Rand
Discription:

   Randomizing of values is, at its most basic form, one of the easier things a programmer can do with the C++ language. I have created this short tutorial for Cprogramming.com to aid you in learning, constructing, and using the functions available to you to randomize values. I will first start with an introduction to the idea of randomizing values, followed by a simple example program that will output three random values. Once a secure understanding of these concepts is in place (hopefully it will be), I will include a short program that uses a range of values from which the random values can be taken. Ok, now that you know why this tutorial was written, and what it includes, you are ready to learn how to randomize values! So without further ado, lets get started, shall we? Many programs that you will write require the use of random numbers. For example, a game such as backgammon requires a roll of two dice on each move. Since there are 6 numbers on each die, you could calculate each roll by finding a random number from 1 to 6 for each die.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
The C++ Modulus Operator
Discription:

   The modulus operator is useful in a variety of circumstances. It is commonly used to take a randomly generated number and reduce that number to a random number on a smaller range, and it can also quickly tell you if one number is a factor of another. If you wanted to know if a number was odd or even, you could use modulus to quickly tell you by asking for the remainder of the number when divided by 2.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Templates and Templated Classes in C++
Discription:

   Templates are a way of making your classes more abstract by letting you define the behavior of the class without actually knowing what datatype will be handled by the operations of the class. In essence, this is what is known as generic programming; this term is a useful way to think about templates because it helps remind the programmer that a templated class does not depend on the datatype (or types) it deals with. To a large degree, a templated class is more focused on the algorithmic thought rather than the specific nuances of a single datatype. Templates can be used in conjunction with abstract datatypes in order to allow them to handle any type of data. For example, you could make a templated stack class that can handle a stack of any datatype, rather than having to create a stack class for every different datatype for which you want the stack to function. The ability to have a single class that can handle several different datatypes means the code is easier to maintain, and it makes classes more reusable.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Using auto_ptr to Handle Memory
Discription:

   The auto_ptr template class is designed to help manage memory in a semi-automatic way and prevent memory leaks when unexpected events such as exceptions would otherwise have caused the normal cleanup code to be skipped.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Templated Functions
Discription:

   C++ templates can be used both for classes and for functions in C++. Templated functions are actually a bit easier to use than templated classes, as the compiler can often deduce the desired type from the function's argument list.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Template Specialization
Discription:

   In many cases when working with templates, you'll write one generic version for all possible data types and leave it at that--every vector may be implemented in exactly the same way. The idea of template specialization is to override the default template implementation to handle a particular type in a different way.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
The C Preprocessor
Discription:

   The C preprocessor modifies a source code file before handing it over to the compiler. You're most likely used to using the preprocessor to include files directly into other files, or #define constants, but the preprocessor can also be used to create "inlined" code using macros expanded at compile time and to prevent code from being compiled twice.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Structure of a program
Discription:

   Probably the best way to start learning a programming language is by writing a program.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Variables and Data Types
Discription:

   The usefulness of the "Hello World" programs shown in the previous section is quite questionable. We had to write several lines of code, compile them, and then execute the resulting program just to obtain a simple sentence written on the screen as result. It certainly would have been much faster to type the output sentence by ourselves. However, programming is not limited only to printing simple texts on the screen. In order to go a little further on and to become able to write programs that perform useful tasks that really save us work we need to introduce the concept of variable.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Constants
Discription:

   Constants are expressions with a fixed value.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Operators
Discription:

   Once we know of the existence of variables and constants, we can begin to operate with them. For that purpose, C++ integrates operators. Unlike other languages whose operators are mainly keywords, operators in C++ are mostly made of signs that are not part of the alphabet but are available in all keyboards. This makes C++ code shorter and more international, since it relies less on English words, but requires a little of learning effort in the beginning.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
Basic Input/Output
Discription:

   C++ uses a convenient abstraction called streams to perform input and output operations in sequential media such as the screen or the keyboard. A stream is an object where a program can either insert or extract characters to/from it. We do not really need to care about many specifications about the physical media associated with the stream - we only need to know it will accept or provide characters sequentially. The standard C++ library includes the header file iostream, where the standard input and output stream objects are declared.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Control Structures
Discription:

   A program is usually not limited to a linear sequence of instructions. During its process it may bifurcate, repeat code or take decisions. For that purpose, C++ provides control structures that serve to specify what has to be done by our program, when and under which circumstances. With the introduction of control structures we are going to have to introduce a new concept: the compound-statement or block. A block is a group of statements which are separated by semicolons (;) like all C++ statements, but grouped together in a block enclosed in braces: { }: { statement1; statement2; statement3; }
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Functions (I)
Discription:

   Using functions we can structure our programs in a more modular way, accessing all the potential that structured programming can offer to us in C++. A function is a group of statements that is executed when it is called from some point of the program. The following is its format: type name ( parameter1, parameter2, ...) { statements }
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Functions (II)
Discription:

   Until now, in all the functions we have seen, the arguments passed to the functions have been passed by value. This means that when calling a function with parameters, what we have passed to the function were copies of their values but never the variables themselves. For example, suppose that we called our first function addition using the following code: int x=5, y=3, z; z = addition ( x , y ); What we did in this case was to call to function addition passing the values of x and y, i.e. 5 and 3 respectively, but not the variables x and y themselves.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Arrays
Discription:

   An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier. That means that, for example, we can store 5 values of type int in an array without having to declare 5 different variables, each one with a different identifier. Instead of that, using an array we can store 5 different values of the same type, int for example, with a unique identifier.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Character Sequences
Discription:

   As you may already know, the C++ Standard Library implements a powerful string class, which is very useful to handle and manipulate strings of characters. However, because strings are in fact sequences of characters, we can represent them also as plain arrays of char elements. For example, the following array: char jenny [20]; is an array that can store up to 20 elements of type char.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Pointers
Discription:

   We have already seen how variables are seen as memory cells that can be accessed using their identifiers. This way we did not have to care about the physical location of our data within memory, we simply used its identifier whenever we wanted to refer to our variable. The memory of your computer can be imagined as a succession of memory cells, each one of the minimal size that computers manage (one byte). These single-byte memory cells are numbered in a consecutive way, so as, within any block of memory, every cell has the same number as the previous one plus one. This way, each cell can be easily located in the memory because it has a unique address and all the memory cells follow a successive pattern. For example, if we are looking for cell 1776 we know that it is going to be right between cells 1775 and 1777, exactly one thousand cells after 776 and exactly one thousand cells before cell 2776.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Dynamic Memory
Discription:

   Until now, in all our programs, we have only had as much memory available as we declared for our variables, having the size of all of them to be determined in the source code, before the execution of the program. But, what if we need a variable amount of memory that can only be determined during runtime? For example, in the case that we need some user input to determine the necessary amount of memory space. The answer is dynamic memory, for which C++ integrates the operators new and delete.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Data Structures
Discription:

   A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths. Data structures are declared in C++ using the following syntax: struct structure_name { member_type1 member_name1; member_type2 member_name2; member_type3 member_name3; . . } object_names; where structure_name is a name for the structure type, object_name can be a set of valid identifiers for objects that have the type of this structure. Within braces { } there is a list with the data members, each one is specified with a type and a valid identifier as its name.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Other Data Types
Discription:

   C++ allows the definition of our own types based on other existing data types. We can do this using the keyword typedef, whose format is: typedef existing_type new_type_name ; where existing_type is a C++ fundamental or compound type and new_type_name is the name for the new type we are defining. For example: typedef char C; typedef unsigned int WORD; typedef char * pChar; typedef char field [50];
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Classes (I)
Discription:

   A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions. An object is an instantiation of a class. In terms of variables, a class would be the type, and an object would be the variable. Classes are generally declared using the keyword class, with the following format: class class_name { access_specifier_1: member1; access_specifier_2: member2; ... } object_names;
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Classes (II)
Discription:

   C++ incorporates the option to use standard operators to perform operations with classes in addition to with fundamental types. For example: int a, b, c; a = b + c; This is obviously valid code in C++, since the different variables of the addition are all fundamental types. Nevertheless, it is not so obvious that we could perform an operation similar to the following one: struct { string product; float price; } a, b, c; a = b + c;
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Friendship and inheritance
Discription:

   n principle, private and protected members of a class cannot be accessed from outside the same class in which they are declared. However, this rule does not affect friends. Friends are functions or classes declared as such. If we want to declare an external function as friend of a class, thus allowing this function to have access to the private and protected members of this class, we do it by declaring a prototype of this external function within the class, and preceding it with the keyword friend:
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Polymorphism
Discription:

   Before getting into this section, it is recommended that you have a proper understanding of pointers and class inheritance. If any of the following statements seem strange to you, you should review the indicated sections: Statement: Explained in: int a::b(c) {}; Classes a->b Data Structures class a: public b; Friendship and inheritance
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Templates
Discription:

   Function templates are special functions that can operate with generic types. This allows us to create a function template whose functionality can be adapted to more than one type or class without repeating the entire code for each type. In C++ this can be achieved using template parameters. A template parameter is a special kind of parameter that can be used to pass a type as argument: just like regular function parameters can be used to pass values to a function, template parameters allow to pass also types to a function. These function templates can use these parameters as if they were any other regular type.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Namespaces
Discription:

   Namespaces allow to group entities like classes, objects and functions under a name. This way the global scope can be divided in "sub-scopes", each one with its own name.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Exceptions
Discription:

   Exceptions provide a way to react to exceptional circumstances (like runtime errors) in our program by transferring control to special functions called handlers. To catch exceptions we must place a portion of code under exception inspection. This is done by enclosing that portion of code in a try block. When an exceptional circumstance arises within that block, an exception is thrown that transfers the control to the exception handler. If no exception is thrown, the code continues normally and all handlers are ignored.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Type Casting
Discription:

   Converting an expression of a given type into another type is known as type-casting. We have already seen some ways to type cast: Implicit conversion Explicit Conversion
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Preprocessor directives
Discription:

   Preprocessor directives are lines included in the code of our programs that are not program statements but directives for the preprocessor. These lines are always preceded by a hash sign (#). The preprocessor is executed before the actual compilation of code begins, therefore the preprocessor digests all these directives before any code is generated by the statements. These preprocessor directives extend only across a single line of code. As soon as a newline character is found, the preprocessor directive is considered to end. No semicolon (;) is expected at the end of a preprocessor directive. The only way a preprocessor directive can extend through more than one line is by preceding the newline character at the end of the line by a backslash (\).
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
Input/Output with files
Discription:

   C++ provides the following classes to perform output and input of characters to/from files: * ofstream: Stream class to write on files * ifstream: Stream class to read from files * fstream: Stream class to both read and write from/to files.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
Function Prototypes
Discription:

   People often ask about how to get started with C++ or move a project or development team to the language. There are many answers to this question. One of the simplest and best is to begin using C++ as a "better C". This term doesn't have a precise meaning but can be illustrated via a series of examples. We will cover some of these examples in forthcoming issues of the newsletter.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
References
Discription:

   In the last newsletter we discussed using function prototypes in C++ to eliminate a common type of error encountered in C, that of calling a function with the wrong number or types of arguments. Another C++ feature that can be used to reduce programming errors is known as references.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Operator New/Delete
Discription:

   In the first newsletter we talked about using C++ as a better C. This term doesn't have a precise meaning, but one way of looking at it is to focus on the features C++ adds to C, exclusive of the most obvious one, namely the class concept used in object-oriented programming. One of these features is operator new and operator delete. These are intended to replace malloc() and free() in the C standard library. To give an example of how these are similar and how they differ, suppose that we want to allocate a 100-long vector of integers for some purpose.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
Declaration Statements
Discription:

   In C, when you write a function, all the declarations of local variables must appear at the top of the function or at the beginning of a block. In C++, declarations of this type are not required to appear only at the top of the function or block.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Function Overloading
Discription:

   uppose that you are writing some software to manipulate calendar dates, and you wish to allow a user of the software to specify dates in one of two forms: 8, 4, 1964 (as a triple of numbers) August 4, 1964 (as a string) In C, if there is a function to convert a raw date into an internal form (for example, the number of days since January 1, 1800), it might look like: long str_to_date(int m, int d, int y) { ... } long str_to_date(char* d) { ... } with one function for each of the two types of dates. Unfortunately, this usage is illegal in C, because two different functions cannot have the same name "str_to_date". In C++ this usage is legal and goes by the term "function overloading". That is, two or more functions may have the same name, so long as the parameter types are sufficiently different enough to distinguish which function is intended. A function may not be overloaded on the basis of its return type.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Operator Overloading
Discription:

   Suppose that you are using an enumeration and you wish to output its value: enum E {e = 37}; cout << e; 37 will indeed be output, by virtue of the enumerator value being promoted to an int and then output using the operator<<(int) function found in iostream.h.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
Inline Functions
Discription:

   uppose that you wish to write a function in C to compute the maximum of two numbers. One way would be to say: int max(int a, int b) { return (a > b ? a : b); } But calling a frequently-used function can be a bit slow, and so you instead use a macro: #define max(a, b) ((a) > (b) ? (a) : (b)) The extra parentheses are required to handle cases like: max(a = b, c = d)
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Type Names
Discription:

   In C, a common style of usage is to say: struct A { int x; }; typedef struct A A; In C++, classes, structs, unions, and enum names are automatically type names, so you can say: struct A { int x; }; void f() { A a; }
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
External Linkage
Discription:

   One of the common issues that always comes up with programming languages is how to mix code written in one language with code written in another. For example, suppose that you're writing C++ code and wish to call C functions. A common case of this would be to access C functions that manipulate C-style strings, for example strcmp() or strlen(). So as a first try, we might say: extern size_t strlen(const char*);
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
General Initializers
Discription:

   C, usage like: int f() {return 37;} int i = 47; int j; for global variables is legal. Typically, in an object file and an executable program these types of declarations might be lumped into sections with names like "text", "data", and "bss", meaning "program code", "data with an initializer", and "data with no initializer".
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Jumping Past Initialization
Discription:

   As we've seen in several examples in previous newsletters, C++ does much more with initializing objects than C does. For example, class objects have constructors, and global objects can have general initializers that cannot be evaluated at compile time. Another difference between C and C++ is the restriction C++ places on transferring control past an initialization.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 1Rating: 1
Function Parameter Names
Discription:

   Suppose that you have a C++ function, and for some reason you don't actually use all the function parameters: int sum(int a, int b, int c) { return a + b; // c not used } Many compilers will give a warning in this case to the effect "warning: parameter c not used". This is perfectly legal code but the warning can be tedious to deal with.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Character Types and Arrays
Discription:

   There are a couple of differences in the way that ANSI C and C++ treat character constants and arrays of characters. One of these has to do with the type of a character constant.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Function-style Casts
Discription:

   In C and C++ (and Java(tm)), you can cast one object type to another by usage like: double d = 12.34; int i = (int)d; Casting in this way gets around type system checking. It may introduce problems such as loss of precision, but is useful in some cases.
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Bit Field Types
Discription:

   Here's a small difference between C and C++. In ANSI C, bit fields must be of type "int", "signed int", or "unsigned int". In C++, they may be of any integral type, for example: enum E {e1, e2, e3}; class A { public: int x : 5; unsigned char y : 8; E z : 5; };
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 4Rating: 1
Anonymous Unions
Discription:

   Here's a simple one. In C++ this usage is legal: struct A { union { int x; double y; char* z; }; };
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Empty Classes
Discription:

   Here's a simple one. In C, an empty struct like: struct A {}; is invalid, whereas in C++ usage like: struct A {};
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 3Rating: 1
Hiding Names
Discription:

   Consider this small example:
4.1Plateform(s): WindowUpdate: 3/31/2009Vistor Rating: 2Rating: 1
Power Article Rewriter
Discription:

   Availability : No Usually Ships within 24 hours With Only $67.00 This product is out of Stock Click here to Request Description: Power Article Rewriter is simply the best content rewriting system in the world. Period. How can I make such a bold claim? Becuase I've seen every other tool on the market. I've tried them all, and none of them cut the mustard. Power Article Rewriter combines all the powerful features of the most expensive rewriting tools with a dead-simple interface that anyone, and I mean ANYONE can learn to use in just a couple of minutes. And it's exactly that simplicity that makes it so powerful (don't be fooled though, there's a robust engine working behind the simple interface) . Your time is now spent being creative, rather than trying to work with complicated programs. There's no learning curve. If you know how to copy-and-paste, then you already know all you need to use Power Article Rewriter. Click on the following image to watch a demo video that will show you how easy it is to use the software. It's just under three minutes long, and after watching it you'll already be an expert at rewriting your articles with Power Article Rewriter
1Plateform(s): Linux,Window,FreeBSD,Mac OSX,Sun SolorisUpdate: 6/29/2009Vistor Rating: 4Rating: 1
  Copyright 2000-2006 © SoloScript.com, All rights reserved.