Hi there about this code I called it Product of Two Numbers using Pointers in C++. According to Wikipedia , a pointer is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere in the computer memory using its address. For High-level programming languages, pointers effectively 'substitute for' general purpose registers in low level languages such as assembly language or machine code - but, in contrast, occupies part of the available memory. A pointer references a value stored elsewhere in memory, and obtaining or requesting the value to which a pointer refers is known (somewhat confusingly ) as dereferencing the pointer. A pointer is a simple implementation of the general reference data type (although it is quite different from the facility referred to as a reference in C++). A number of languages support some type of pointer, although some are more restricted than others.
If a pointer is significantly abstracted, such that it can no longer be manipulated as an address, the resulting data structure is no longer a pointer; see the more general reference article for more discussion of these.
Pointers to data significantly improve performance for repetitive operations such as traversing strings, lookup tables, control tables and tree structures. In particular, it is often much cheaper in time and space to copy and dereference pointers than it is to copy and access the data to which the pointers point.
Pointers are also used to hold the addresses of entry points for called subroutines in procedural programming and for run-time linking to dynamic link libraries (DLLs). In Object-oriented programming, pointers to functions are used for binding methods, often using what are called virtual method tables.
While "pointer" has been used to refer to references in general, it more properly applies to data structures whose interface explicitly allows the pointer to be manipulated (arithmetically) as a memory address. Because pointers allow both protected and unprotected access to memory addresses, there are risks associated with using them particularly in the latter case. For general information about references
Pointers is very important in C/C++ Programming mainly because it utilize the system resources of the computer efficiently. Most programmers doesnt want to use pointers because it is very difficult and dangerous to use. But in my own experience if you know what kind of program you want to create using pointers then your program is faster, more effiecient if you use pointers as your data structure in C/C++ programming.
If hope this code will help beginners and new comers in C/C++ programming how to use effectively pointers in their programming projects.
If you have some questions about my works please send me an email at [email protected]
People here in the Philippines can reach me at my mobile phone number at 09296768375 and my telephone number +63 (034) 4335081. Thank you very much and Happy Programming.
Mr. Jake Rodriguez Pomperada, MAED - Instructional Technology
Programmer, Teacher and Computer Techncian
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.