0_0_39173165_13703.cpp: In function 'void initialList(SequentialList*, int)':
0_0_39173165_13703.cpp:11:28: error: 'elements' does not name a type
11 | list->elements=new elements[];
| ^~~~~~~~
0_0_39173165_13703.cpp: In function 'void insert(SequentialList*, int, int)':
0_0_39173165_13703.cpp:28:52: error: invalid conversion from 'int' to 'int*' [-fpermissive]
28 | eleType *newCapacity=list->capacity*2;
| ~~~~~~~~~~~~~~^~
| |
| int
0_0_39173165_13703.cpp:29:24: error: 'elements' was not declared in this scope; did you mean 'element'?
29 | list->*elements=new eleType[newCapacity];
| ^~~~~~~~
| element
0_0_39173165_13703.cpp:29:45: error: expression in new-declarator must have integral or enumeration type
29 | list->*elements=new eleType[newCapacity];
| ^~~~~~~~~~~
0_0_39173165_13703.cpp:31:25: error: 'newElements' was not declared in this scope; did you mean 'element'?
31 | newElements[i]=list->elements[i]
| ^~~~~~~~~~~
| element
0_0_39173165_13703.cpp:34:38: error: 'struct SequentialList' has no member named 'newElements'; did you mean 'elements'?
34 | list->elements=list->newElements;
| ^~~~~~~~~~~
| elements
0_0_39173165_13703.cpp:35:38: error: 'struct SequentialList' has no member named 'newCapacity'; did you mean 'capacity'?
35 | list->capacity=list->newCapacity;
| ^~~~~~~~~~~
| capacity
0_0_39173165_13703.cpp:38:17: error: 'elements' was not declared in this scope; did you mean 'element'?
38 | elements[i-1]=elements[i];
| ^~~~~~~~
| element
0_0_39173165_13703.cpp: In function 'void deleteList(SequentialList*, int)':
0_0_39173165_13703.cpp:48:17: error: 'elements' was not declared in this scope
48 | elements[i]=elements[i+1];
| ^~~~~~~~
0_0_39173165_13703.cpp: In function 'void findElement(SequentialList*, int)':
0_0_39173165_13703.cpp:55:32: error: return-statement with a value, in function returning 'void' [-fpermissive]
55 | return i
| ^
0_0_39173165_13703.cpp:55:33: error: expected ';' before '}' token
55 | return i
| ^
| ;
56 | }
| ~
0_0_39173165_13703.cpp: In function 'void getElement(SequentialList*, int)':
0_0_39173165_13703.cpp:63:36: error: return-statement with a value, in function returning 'void' [-fpermissive]
63 | return list->elements[index];
| ~~~~~~~~~~~~~~~~~~~~^
0_0_39173165_13703.cpp: In function 'int main()':
0_0_39173165_13703.cpp:72:34: error: expected ';' before 'for'
72 | initialList(&s,1)
| ^
| ;
73 | for(int i=0;i<n;++i){
| ~~~
0_0_39173165_13703.cpp:73:29: error: 'i' was not declared in this scope
73 | for(int i=0;i<n;++i){
| ^
0_0_39173165_13703.cpp:79:43: error: void value not ignored as it ought to be
79 | int val=getElement(&s,i)
| ~~~~~~~~~~^~~~~~
0_0_39173165_13703.cpp:84:15: error: 'prod' was not declared in this scope
84 | cout<<prod<<endl;
| ^~~~
0_0_39173165_13703.cpp:85:10: error: expected '}' at end of input
85 | }
| ^
0_0_39173165_13703.cpp:68:11: note: to match this '{'
68 | int main(){
| ^
|