I am trying to assign values to a struct array. However, I'm getting the "Expected expression" error. Is there something that I'm missing? I'm using Xcode in case that matters.
#include <stdio.h> #include <stdlib.h> struct MEASUREMENT { float relativeHumidity; float temperature; char timestamp[20]; }; int main() { struct MEASUREMENT measurements[5]; measurements[0] = {0.85, 23.5, "23.07.2019 08:00"}; //Expected expression error measurements[1] = {0.71, 19.0, "04.08.2019 10:21"}; //Expected expression error measurements[2] = {0.43, 10.2, "07.08.2019 02.00"}; //Expected expression error measurements[3] = {0.51, 14.3, "20.08.2019 14:45"}; //Expected expression error measurements[4] = {0.62, 10.9, "01.09.2019 01:00"}; //Expected expression error Thanks!