English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

please I need help apace
thanks for every one can help me

2006-11-14 10:39:28 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

I mean I need explaining to
list array subject in data structure and how I can programmed them in c++ language
with no pointer ( not as linked list).

2006-11-14 11:19:12 · update #1

4 answers

u have to ponit it or use

these are the 2 way's:

#include
using namespcae std;
int main()
{
int num[8];
int index;

num[0] = 42;
num[1] = 2001;
num[2] = 7;
num[3] = 180;
num[4] = 99;
num[5] = 1993;

for(index = 0; index <= 5; index++)
{
std::cout<< index[num] << endl;
}
system("pause");
return 0;
}

or

#include
#define MAX 20
using namespcae std;

int main()
{

int a[MAX] = {23,43,4,5,34,343,12,14};
int b;

cout.setf(ios::right);

for(b = 0; b < MAX; b++){

cout << endl << endl;

cout << "The Elemnt in ";

cout.width(2);

cout << (b +1) << " is ";

cout.width(2);

std::cout << b[a];
}
return 0;
}

2006-11-14 10:57:00 · answer #1 · answered by Best Helper 4 · 0 0

I dont quite understand the question either. But from what I think your asking...

1) Declare the array

datatype arrayname[listSize];

example

int array1[16]

2) Fill the array with values

either use a for loop, or manually assign values.

2006-11-14 19:32:59 · answer #2 · answered by D 4 · 0 0

It wouldn't be a list anymore since everything you'll store in it will be static allocated... I don't quite understand your question.

2006-11-14 18:41:43 · answer #3 · answered by agent-X 6 · 0 0

use the vector class

#include

2006-11-14 19:35:46 · answer #4 · answered by pcguy49 2 · 0 0

fedest.com, questions and answers