4 Replies - 707 Views - Last Post: 19 March 2008 - 07:47 PM Rate Topic: -----

#1 upant  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 84
  • Joined: 15-February 08

arrays in C++

Posted 19 March 2008 - 06:25 PM

anyone??????????
Is This A Good Question/Topic? 0
  • +

Replies To: arrays in C++

#2 code_monster  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 19-March 08

Re: arrays in C++

Posted 19 March 2008 - 07:13 PM

What do you need to know about them?? Just the syntax??:

//example program
#include <stdio.h>
#include <iostream>

using namespace std;

int main(void)
{
	 int counter;

	 int arrayName[10];  //define a one dimensional array

	 //using the array
	 for(counter=0; counter<10; counter++)
	 {
		  arrayName[counter] = counter;  //assigns value of counter to array of counter
	 }

	 for(counter=0; counter<10; counter++)
	 {
		  cout << arrayName[counter] << endl;  //prints value of array of counter 
	 }
	 
	 return 0;
}

//your output should look like this:
//***************************
0
1
2
3
4
5
6
7
8
9

***************************//



Hope that hels you.
Was This Post Helpful? 0
  • +
  • -

#3 upant  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 84
  • Joined: 15-February 08

Re: arrays in C++

Posted 19 March 2008 - 07:32 PM

I have posted another topic about arrays today and nobody posted any reply yet so if u could look at my problems I would appreciate it!
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5247
  • View blog
  • Posts: 27,070
  • Joined: 10-May 07

Re: arrays in C++

Posted 19 March 2008 - 07:39 PM

View Postupant, on 19 Mar, 2008 - 07:32 PM, said:

I have posted another topic about arrays today and nobody posted any reply yet so if u could look at my problems I would appreciate it!

Please don't double post... No one is going to just "know" that's what you are referring to.
Was This Post Helpful? 0
  • +
  • -

#5 upant  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 84
  • Joined: 15-February 08

Re: arrays in C++

Posted 19 March 2008 - 07:47 PM

My orginal question has the topic "arrays in C++, little bit help needed"
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1