Help with array

This is a discussion on Help with array within the C++ Programming forums, part of the General Programming Boards category; Code: for (j=1; j <= numEntered; j++){ cout << "Please enter value "; cin >> A[j]; } Arrays are 0-based....

  1. #16
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    Code:
    for (j=1; j <= numEntered; j++){
    	cout << "Please enter value ";
    	cin >> A[j];
    }
    Arrays are 0-based.

  2. #17
    Registered User
    Join Date
    Feb 2009
    Posts
    83
    Quote Originally Posted by cyberfish View Post
    Arrays are 0-based.
    So should i set j=0

  3. #18
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    Should you?

    Trace the code on paper.

  4. #19
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,650

  5. #20
    Registered User
    Join Date
    May 2009
    Posts
    1
    walkonwater-

    i have a very similair problem I am working on. would you mind contacting me and emailing me your completed source code so i can view the header files?

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 05-29-2009, 07:25 PM
  2. Replies: 6
    Last Post: 11-09-2006, 02:28 AM
  3. [question]Analyzing data in a two-dimensional array
    By burbose in forum C Programming
    Replies: 2
    Last Post: 06-13-2005, 07:31 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21