gondola.cpp:6:10: error: expected unqualified-id before 'int'
int id, int val;
^~~
gondola.cpp: In constructor 'Gondola::Gondola(int, int)':
gondola.cpp:9:3: error: 'val' was not declared in this scope
val = _val;
^~~
gondola.cpp:9:3: note: suggested alternative: '_val'
val = _val;
^~~
_val
gondola.cpp: In member function 'bool Gondola::operator<(const Gondola&) const':
gondola.cpp:12:3: error: 'val' was not declared in this scope
val < rhs.val;
^~~
gondola.cpp:12:13: error: 'const struct Gondola' has no member named 'val'
val < rhs.val;
^~~
gondola.cpp:13:2: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:24:20: error: expected ']' before ')' token
if(in[inputSeq[i]) return 0;
^
gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:45:6: error: 'i' was not declared in this scope
for(i = 0; i < n; i++){
^
gondola.cpp:46:6: error: 'inputSeq' was not declared in this scope
if(inputSeq[i] <= n) break;
^~~~~~~~
gondola.cpp:49:5: error: 'i' was not declared in this scope
if(i == n){
^
gondola.cpp:53:7: error: 'inputSeq' was not declared in this scope
k = inputSeq[i] - 1;
^~~~~~~~
gondola.cpp:56:22: error: 'inputSeq' was not declared in this scope
ord[(k + j) % n] = inputSeq[(i + j) % n];
^~~~~~~~
gondola.cpp:56:32: error: 'i' was not declared in this scope
ord[(k + j) % n] = inputSeq[(i + j) % n];
^
gondola.cpp:57:22: error: expected primary-expression before '(' token
v.push_back(Gondola((k + j) % n, ), ord[(k + j) % n]);
^
gondola.cpp:57:36: error: expected primary-expression before ')' token
v.push_back(Gondola((k + j) % n, ), ord[(k + j) % n]);
^
gondola.cpp:60:2: error: 'i' was not declared in this scope
i = 0;
^
gondola.cpp:63:8: error: 'struct Gondola' has no member named 'val'
if(x.val <= n) continue;
^~~
gondola.cpp:64:15: error: 'struct Gondola' has no member named 'val'
for(; s < x.val; s++){
^~~
gondola.cpp:68:9: error: 'struct Gondola' has no member named 'val'
s = x.val + 1;
^~~
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:76:6: error: 'i' was not declared in this scope
for(i = 0; i < n; i++){
^
gondola.cpp:80:5: error: 'i' was not declared in this scope
if(i == n){
^
gondola.cpp:87:32: error: 'i' was not declared in this scope
ord[(k + j) % n] = inputSeq[(i + j) % n];
^
gondola.cpp:89:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^