view Resources/PostgreSQL/c_flexmember.c @ 28:c0cb5d2cd696

checks depending on Orthanc version
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 16 Jul 2018 14:48:43 +0200
parents 7cea966b6829
children
line wrap: on
line source

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
struct s { int n; double d[]; };

int main ()
{
  int m = getchar ();
  struct s *p = malloc (offsetof (struct s, d)
                        + m * sizeof (double));
  p->d[0] = 0.0;
  return p->d != (double *) NULL;
}