array help

This is a discussion on array help within the C++ Programming forums, part of the General Programming Boards category; you don't need 2 arrays you don't need to call readData twice Code: int main() { //Declaration Section int range[ARRAY_LENGTH] ...

  1. #16
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    you don't need 2 arrays
    you don't need to call readData twice

    Code:
    int main()
    {
          //Declaration Section
          int range[ARRAY_LENGTH] = {0}; //to initialize array with zeroes
    //      int thearray8[ARRAY_LENGTH]; we don't need the seocnd array
    
          readData(range); //fill array
          printResults(range); //print the same array
          
          
          system("PAUSE");
          return 0;
    }//end of main
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  2. #17
    Registered User
    Join Date
    Dec 2006
    Posts
    9
    thanks

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