Read a small segment of large array and store in small array

This is a discussion on Read a small segment of large array and store in small array within the C Programming forums, part of the General Programming Boards category; I've a big char array, Code: char big[100000]; And a small array in a node of a linked list: Code: ...

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    18

    Read a small segment of large array and store in small array

    I've a big char array,

    Code:
    char big[100000];
    And a small array in a node of a linked list:

    Code:
    struct Root
    {
         char small[100];
         struct Root *next;
    }
    How can i store each 100 bytes of large array into small array of each node with a single line of code? i.e. I don't want to copy byte by byte under a loop. Is it possible?

  2. #2
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    See memcpy,but you still need a loop.By this,you have not to copy byte by byte

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. please help me with this small question about array
    By jackson6612 in forum C++ Programming
    Replies: 4
    Last Post: 06-22-2011, 06:19 AM
  2. Small problem with this array...
    By Merholtz in forum C Programming
    Replies: 7
    Last Post: 11-03-2008, 04:16 PM
  3. how to sort the scores(small to large)
    By ok_good in forum C++ Programming
    Replies: 2
    Last Post: 11-20-2005, 04:03 AM
  4. Small array of strings prob
    By bstringer in forum C Programming
    Replies: 15
    Last Post: 08-04-2005, 07:27 PM
  5. help with small program. array issue
    By InvariantLoop in forum C++ Programming
    Replies: 2
    Last Post: 04-09-2004, 01:26 PM

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