Thread: Saving into a char array

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    101
    When I posted the question I was just interested in how to store de structs do the char array because the problem is to store several queues into this array.
    The array type is unsigned char, actually. I didn't thought it mattered but know I'm not so sure. Is the code from post #2 still valid?
    I said it was integers because I was being passed values like 1 and 2. Now I notice it's to store also unsigned char.

    Your code gave me a really good idea though.
    I'm just gonna use one part of the array to store where the queues end. Then I'll just shift the values as they are pushed and poped. It's not very efficient but I was playing around with structs with pointers and they take up a LOT of space, it's insane! I can store 10 times more objects using this method instead of pointers.
    Last edited by kotoko; 06-02-2011 at 06:32 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 11-17-2008, 12:36 PM
  2. Saving chars to array
    By ReggieBE in forum C Programming
    Replies: 13
    Last Post: 03-26-2006, 11:11 AM
  3. Saving text into char* vectors
    By Niara in forum C++ Programming
    Replies: 5
    Last Post: 12-09-2005, 03:50 PM
  4. Saving Map Array To Disk
    By Tommaso in forum Game Programming
    Replies: 4
    Last Post: 07-18-2003, 12:03 AM
  5. Saving array of structs to file
    By |deep| in forum C++ Programming
    Replies: 2
    Last Post: 06-01-2002, 08:14 AM