Learn all about arrays in C++, useful stuff.
Tutorial Details:
Arrays in C and Cpp Programming
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.
This would make an integer array with 100 slots, or places to store values(also called elements). To access a specific part element of the array, you merely put the array name and, in brackets, an index number. This corresponds to a specific element of the array.
The one trick is that the first index number, and thus the first element, is zero, and the last is the number of elements minus one. 0-99 in a 100 element array, for example.
What can you do with this simple knowledge? Lets say you want to store a string, because C had no built-in datatype for strings, it was common to use arrays of characters to simulate strings. (C++ now has a string type as part of the standard library.)
will allow you to declare a char array of 100 elements, or slots. Then you can receive input into it it from the user, and if the user types in a long string, it will go in the array. The neat thing is that it is very easy to work with strings in this way, and there is even a header file called cstring.
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: C and Cpp Programming in C and Cpp Arrays Tutorial
View Tutorial: C and Cpp Programming in C and Cpp Arrays Tutorial
Related
Tutorials:
Accelerate your Java apps! - JavaWorld - September 1998
Accelerate your Java apps! - JavaWorld - September 1998 |
Smart object-management saves the
day - JavaWorld November 1999
Smart object-management saves the
day - JavaWorld November 1999 |
C# : A language alternative or just J--? (part1)
C# : A language alternative or just J--? (part1) |
C#: A language alternative or just J--?, Part 2 - JavaWorld December 2000
C#: A language alternative or just J--?, Part 2 - JavaWorld December 2000 |
Language improvements
and models make
great Java - JavaWorld
Language improvements
and models make
great Java - JavaWorld |
Integrate Java and C++ with Jace
Integrate Java and C++ with Jace |
Java Tip 130: Do you
know your data
size?
Java Tip 130: Do you
know your data
size? |
JSP Standard Tag Library eases Webpage
development
JSP Standard Tag Library eases Webpage
development |
The J2EE 1.4 Tutorial
The J2EE 1.4 Tutorial is a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial. |
Navigate through
virtual worlds using Java 3D
Navigate through
virtual worlds using Java 3D |
JTwain
JTwain will implement a Java interface to the the Win32 C DLL TWAIN acquire methods. |
Servlet Essentials
This document explains the concepts of Java Servlets and provides a step-by-step tutorial for writing HTTP Servlets with complete source code for the example Servlets. The tutorial and the other chapters cover all facets of Servlet programming from a ... |
Interoperability with Patterns and Strategies for Document-Based Web Services
In Part 2 of this article, we demonstrate interoperability for document-driven web services with Microsoft .NET (C#) using strategies discussed in Part 1. |
Java Technology Fundamentals
Learn how to use variable arguments lists, the new JConsole utility to monitor applications, and discover ways to learn what you need to know to get Sun certified. |
10 Minutes Guide to Ant
10 Minutes Guide to Ant
10 Minutes Guide to Ant
Previous Tutorial Index Next
Introduction
Well for the next 10 minutes get ready to devote to the ant guide. This will make some sence to the ant.
Ant is a free tool under GNU Licence and is |
Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0
Previous Tutorial Index Next
In this lesson I will show you how to build you web application and install on the Jboss 3.0 |
Parisonz Solutions!
Parisonz Solutions!
W elcome to Parisonz Solutions . The purpose of this web is to Develop and Distribute Projects to Businesses and Individuals though Web. We have a wide range of projects completed online — including software development, web |
What is WAP? Wireless Application Protocol
What is WAP? Wireless Application Protocol
Tutorial
What is WAP?
W ireless Application Protocol or WAP for short is simply a protocol - a standerized way for delivering Internet data over wireless networks. Thus WAP links Wireless Network with |
New Technical Articles: 64-bit Programming on Solaris 10 OS for x86 Platforms
Four technical articles describe the new Sun Studio 10 software's 64-bit programming features on the Solaris 10 OS for x86 and AMD64 platforms. Important issues regarding the AMD64 ABI (Application Binary Interface), debugging, migration to 64-bits, and p |
Using DTrace to Profile and Debug A C++ Program (Technical Article)
In this test case, the DTrace capability in the Solaris 10 OS is used to identify an error common to C++ applications -- the memory leak. |
|
|
|