Thread: Issues with file reading

  1. #1
    Registered User
    Join Date
    Nov 2017

    Issues with file reading

    Hello everyone,

    To say it simply I've wanted to construct my own database-management system in C language with data files in YAML format.
    I have managed to create a database with multiple tables with for each table a YAML file which contains every rows and columns. It's very experimental for now but my issue today is to modify a given row from a specific table. For that I would want to know the structure of the table from the YAML file so I've tried plenty of methods to parse it using strtok() but I couldn't get to have the expected result. Here's the format of every data file:

      idColumn: 0
      column1: 90
      column2: Test
      idColumn: 1
      column1: 4
      column2: Test2
    What I want to retrieve is only the name of every columns from a table but I have issues trying to parse it.
    Also I'm a beginner in programming, even more in C, so I'm having hard times understanding how it works

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Is the format strict or loose? I'm asking because if it's strict, you can simply search for double quotation marks at the start of each line. I'm not familiar with YAML format, sorry...
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issues with reading series of 2D matrices from file
    By sean_cantab in forum C++ Programming
    Replies: 7
    Last Post: 11-17-2016, 11:07 PM
  2. issues reading and writing to file.
    By pack in forum C Programming
    Replies: 6
    Last Post: 03-20-2013, 11:11 AM
  3. issues reading a file.
    By Xinzin in forum C++ Programming
    Replies: 9
    Last Post: 08-17-2012, 07:53 PM
  4. issues reading from a file
    By sanddune008 in forum C Programming
    Replies: 3
    Last Post: 07-16-2010, 05:01 AM
  5. String Reading Issues
    By Acolyte in forum C Programming
    Replies: 8
    Last Post: 11-19-2007, 07:37 AM

Tags for this Thread