Thread: Overwriting an integer array

  1. #1
    Registered User
    Join Date
    Oct 2011
    Location
    Wales, UK
    Posts
    1

    Overwriting an integer array

    I have a program which overwrites elements of an integer array at the end of a loop. Before the "}" the elements are correct, and after it they aren't. Any ideas?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    Plenty of ideas, but without seeing the code, it would be just shots in the dark.
    Post your code.
    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
    Registered User
    Join Date
    Oct 2011
    Location
    india
    Posts
    18
    this is a simple issue...pls post ur code

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can I avoid overwriting into an array?
    By Pztar in forum C Programming
    Replies: 3
    Last Post: 06-07-2011, 03:17 PM
  2. integer array to char array?
    By DJPlayer in forum C Programming
    Replies: 4
    Last Post: 10-19-2009, 09:59 PM
  3. Overwriting all in array, why?
    By guesst in forum C Programming
    Replies: 7
    Last Post: 10-09-2008, 05:56 PM
  4. Overwriting Array with New Array
    By Osiris990 in forum C++ Programming
    Replies: 14
    Last Post: 02-25-2008, 01:56 PM
  5. Converting character array to integer array
    By quiet_forever in forum C++ Programming
    Replies: 5
    Last Post: 04-02-2007, 05:48 AM