Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup reading from csv, json and xml #16

Closed
wants to merge 1 commit into from

Conversation

AdvaySanketi
Copy link

Closes #6

@bunsamosa-bot
Copy link

bunsamosa-bot bot commented Oct 19, 2024

Thank you from Opening this Pull Request, @AdvaySanketi ! A Maintainer will review it soon!

@AdvaySanketi
Copy link
Author

@AlaynaMonteiro Plz check out the PR

@AlaynaMonteiro
Copy link
Collaborator

AlaynaMonteiro commented Oct 20, 2024

  241 |     printf(*filename);
      |            ^~~~~~~~~
      |            |
      |            char
In file included from functions.c:1:
/usr/include/stdio.h:363:43: note: expected ‘const char * restrict’ but argument is of type ‘char’
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
functions.c: In function ‘ReadFromFileJSON’:
functions.c:402:60: error: passing argument 3 of ‘parse_json_double_field’ from incompatible pointer type [-Wincompatible-pointer-types]
  402 |         parse_json_double_field(student_block, "\"sgpa\"", &stu[*n].sgpa);
      |                                                            ^~~~~~~~~~~~~
      |                                                            |
      |                                                            float *
functions.c:332:73: note: expected ‘double *’ but argument is of type ‘float *’
  332 | void parse_json_double_field(const char *json, const char *key, double *output) {
      |                                                                 ~~~~~~~~^~~~~~
functions.c: In function ‘ReadFromFileXML’:
functions.c:532:51: error: passing argument 3 of ‘parse_xml_double_field’ from incompatible pointer type [-Wincompatible-pointer-types]
  532 |             parse_xml_double_field(block, "sgpa", &stu[i].sgpa);
      |                                                   ^~~~~~~~~~~~
      |                                                   |
      |                                                   float *
functions.c:458:81: note: expected ‘double *’ but argument is of type ‘float *’
  458 | void parse_xml_double_field(const char *student_block, const char *tag, double *output) {

The code has a bunch of errors and hence does not run. Therefore, I have not given any points

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File format flexibility
2 participants