Thread: a handy data structure through c

  1. #1
    Registered User
    Join Date
    Apr 2011

    a handy data structure through c

    friends, can we make a handy data structure that will have both the simplicity of array and good memory utilization like linked list and then just #include the code to use in program as one desires. java has got arraylists and the exception handling we need it for c also?

  2. #2
    Registered User
    Join Date
    Jan 2009
    It's not possible, you will get an interface that is nothing like the simplicity of an array.

  3. #3
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    London, United Kingdom
    Yes, as Subsonics already pointed out you can't have an animal with the agility and size of a mouse and the muscle mass of an elephant.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. difference between data object and data structure?
    By c_lady in forum C++ Programming
    Replies: 2
    Last Post: 02-22-2011, 12:30 PM
  2. Data structure for storing serial port data in firmware
    By james457 in forum C Programming
    Replies: 4
    Last Post: 06-15-2009, 09:28 AM
  3. data structure design for data aggregation
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 05-20-2008, 06:43 AM
  4. Handy Latin Phrases :)
    By Carlos in forum A Brief History of
    Replies: 1
    Last Post: 09-02-2003, 03:34 AM

Tags for this Thread