Thread: Newbie array problem

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    8

    Newbie array problem

    Hey,

    I am completely new to this and am trying to make a simple program but am getting 1 error that I cant find.

    The code is this:

    Edited



    Can someone please tell me what is causing that? Sorry if it is really simple but I have tries for about an hour.

    Thankyou
    Last edited by Andy123; 05-17-2006 at 05:45 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > fflush(stdin);
    Read the FAQ - this is undefined.
    It might work for you, but it won't work for me.

    > void GetName(char name[20])
    Your prototype also needs the same parameters as well
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Compare the function prototype to the function definition.

    [edit]
    Curses, foiled again!
    [/edit]


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

  4. #4
    Registered User
    Join Date
    Feb 2006
    Posts
    8
    Thankyou

    Working now Woo Hoo!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help w/ array problem
    By rhythm313 in forum C++ Programming
    Replies: 3
    Last Post: 11-12-2002, 12:12 AM
  2. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 08:31 AM
  3. problem: reading user input into an array
    By alpha561 in forum C Programming
    Replies: 13
    Last Post: 05-24-2002, 07:23 PM
  4. Comparing a 2d Array (newbie)
    By Cockney in forum C++ Programming
    Replies: 12
    Last Post: 12-08-2001, 12:15 PM
  5. Hi, could someone help me with arrays?
    By goodn in forum C Programming
    Replies: 20
    Last Post: 10-18-2001, 09:48 AM