Try,
struct caketime { double baking_time[4]; double prepare_time[4]; };
instead of,
struct caketime { double baking_time [4]={20,75,40,30}; double prepare_time[4]={30,40,25,60}; };
You should not initialize the array elements inside the structure.
Related Posts:
- How to initialize array to 0 in C?
- How to properly malloc for array of struct in C
- Convert char array to a int number in C
- Returning an array using C
- How to copy a char array in C?
- C subscripted value is neither array nor pointer nor vector when assigning an array element value
- Initializing array of structures
- How to empty a char array?
- What is the difference between array and enum in C ?
- Can I create an Array of Char pointers in C?
- Excess elements of scalar initializer for pointer to array of ints
- Can I define a function inside a C structure?
- Parameter name omitted error?
- How to allocate array of pointers for strings by malloc in C?
- typedef fixed length array
- C: warning: excess elements in array initializer; near initialization for ‘xxx’ ; expects ‘char *’, but has type ‘int’
- Pointer to 2D arrays in C
- Initializing 2D char array in C
- How do I check if a string contains a certain character?
- strdup() – what does it do in C?
- strdup() – what does it do in C?
- Return array in a function
- How do I determine the size of my array in C?
- char *array and char array[]
- How do I create an array of strings in C?
- “Expected expression before ‘ { ‘ token”
- C pointers and arrays: [Warning] assignment makes pointer from integer without a cast
- How to print the array?
- “error: assignment to expression with array type error” when I assign a struct field (C)
- Getting “conflicting types for function” in C, why?
- How do you make an array of structs in C?
- Array versus linked-list
- Getting “conflicting types for function” in C, why?
- C error: undefined reference to function, but it IS defined
- Is there a function to copy an array in C/C++?
- Reverse Contents in Array
- How do I create an array of strings in C?
- Return char[]/string from a function [duplicate]
- error: expected primary-expression before ‘)’ token (C)
- Why am I getting “array initializer must be an initializer list or string literal”?
- What does ** do in C language?
- How do you pass a function as a parameter in C?
- Using Dynamic Memory allocation for arrays
- How do I create an array of strings in C?
- How do you pass a function as a parameter in C?
- How to make an array with a dynamic size? General usage of dynamic arrays (maybe pointers too)?
- How do you pass a function as a parameter in C?
- Quick Way to Implement Dictionary in C
- Finding the length of a Character Array in C
- Return char[]/string from a function
- How to print a char array in C through printf?
- How to clear all the elements of array in C?
- Zero an array in C code
- Passing an array by reference in C?
- Excess elements in char array initializer error
- waitpid, wnohang, wuntraced. How do I use these
- How to do scanf for single char in C
- Sign extend a nine-bit number in C
- Warning: assignment from incompatible pointer type
- Break statement not within loop or switch in C
- How to create an array of strings in C?
- C++ array assign error: invalid array assignment
- Cache Simulator in C
- C: error: expected ‘)’ before ‘;’ token
- Where is the C auto keyword used?
- make: Nothing to be done for `all’
- Initialization from incompatible pointer type warning when assigning to a pointer
- I’m getting “Invalid Initializer”, what am I doing wrong?
- Data argument not used by format strings in C
- execv vs execvp, why just one of them require the exact file’s path?
- difference between
and - expected expression before ‘{‘ token
- Setting std=c99 flag in GCC
- C Vector/ArrayList/LinkedList
- Bind failed: Address already in use
- Warning/error “function declaration isn’t a prototype”
- What is the difference between %f and %lf in C?
- warning: initializer element is not computable at load time
- What is stdin in C language?
- How to prevent multiple definitions in C?
- How to pass 2D array (matrix) in a function in C?
- error: ‘for’ loop initial declarations are only allowed in C99 mode [duplicate]
- How can you print multiple variables inside a string using printf?
- c – warning: implicit declaration of function ‘printf’
- Flushing buffers in C
- What are 0x01 and 0x80 representative of in C bitwise operations?
- Convert char array to string use C
- How to make parent wait for all child processes to finish?
- Undefined Reference issues using Semaphores
- Iterate through a C array
- What is time(NULL) in C?
- Use of cudamalloc(). Why the double pointer?
- C dynamically growing array
- Why should we check WIFEXITED after wait in order to kill child processes in Linux system call?
- How to compile makefile using MinGW?
- Mapping a numeric range onto another
- Why are hexadecimal numbers prefixed with 0x?
- Portable way to check if directory exists [Windows/Linux, C]
- Python: Can a function return an array and a variable?
- OpenGL — GL_LINE_LOOP —