Help Needed Please... Asap

This is a discussion on Help Needed Please... Asap within the C Programming forums, part of the General Programming Boards category; i am struggling with a programming exercise, i have to create an array as a new header file and then ...

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    2

    Help Needed Please... Asap

    i am struggling with a programming exercise, i have to create an array as a new header file and then incorporate this into my program. i then have to search this array for individual intigers(this searching bit i can do)

    CAN ANYONE HELP with how to get the array into my program.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826

    Re: Help Needed Please... Asap

    Originally posted by Shabba
    i am struggling with a programming exercise, i have to create an array as a new header file and then incorporate this into my program. i then have to search this array for individual intigers(this searching bit i can do)

    CAN ANYONE HELP with how to get the array into my program.
    How about actually posting your code? How about READING THIS FIRST like you were supposed to? How about learning to ask smart questions while you're at it?

    Do you ever get the feeling that you've just said the same thing? What a trip.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >i have to create an array as a new header file
    You mean as in global data declared in a header file? Not a good idea, generally.

    >CAN ANYONE HELP with how to get the array into my program.
    Code:
    #ifndef ARRAY_HEADER
    #define ARRAY_HEADER
    
    extern int array[]; /* Bad style */
    
    #endif
    Code:
    #include "array_header.h"
    
    #define SIZE 10
    
    int array[SIZE];
    
    int main ( void )
    {
      ...
    
      return 0;
    }
    And next time, try being less whiney and give us some more information as to what you've tried that doesn't work. This typically gives us a better idea of what you are trying to do when your explanation is confusing.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Programmers needed ASAP in the San Francisco bay area, CA!
    By ITS in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 08-13-2007, 03:18 PM
  2. Help Needed asap
    By 2 legs of man in forum C++ Programming
    Replies: 1
    Last Post: 01-18-2006, 12:29 PM
  3. Help Needed Asap With Searching An Array!
    By HelpMe++ in forum C++ Programming
    Replies: 5
    Last Post: 05-23-2003, 04:44 AM
  4. Help needed with a Project. ASAP Thanks
    By Shahram_z in forum C Programming
    Replies: 2
    Last Post: 10-31-2002, 02:12 PM

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