Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Dynamic/Custom arrays, filestorage (databases)

Dynamic/Custom arrays, filestorage (databases)

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialdatabasedata-structuresperformancehelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Peter Pearson
    wrote on last edited by
    #1

    Hi, I'm looking for a way to produce a program that will allow the user to store records of particular things they want, but they initially choose what type of data they want to store for the records. For example, if the user wants to store loads of records consisting of three string types, all the program would need to store are three CStrings (or whatever). If they want to store say two strings, two true and falses and a number, the program would need to be able to store two CStrings, two BOOLs and an int. Basically it would be like a custom database, but the problem I've got with it is setting up how the storage would work in an array and saving to file. At present, I've got 12 fields available (4 strings, 4 BOOLs and 4 ints) and the user can tick or untick them if they want them or not. All fields are stored. But not only is this wasteful in terms of storage and memory in terms of the fields not being used, but it doesn't give the user as much control as I want to. I know using an existing database engine would be a lot easier, but has anyone got any ideas or pointers as to how to go about creating a custom one? Many thanks, Peter Pearson

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups