Main.cpp: In function 'int main()':
Main.cpp:72:69: error: no matching function for call to 'index(int&, int)'
72 | update(1, 1, n, index(segments[R].f), index(segments[R].s, 1));
| ^
In file included from /usr/include/string.h:432,
from /usr/include/c++/10/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:48,
from Main.cpp:1:
/usr/include/strings.h:55:1: note: candidate: 'char* index(char*, int)' (near match)
55 | index (char *__s, int __c) __THROW
| ^~~~~
/usr/include/strings.h:55:1: note: conversion of argument 1 would be ill-formed:
Main.cpp:7:11: error: invalid conversion from 'int' to 'char*' [-fpermissive]
7 | #define s second
| ^
| |
| int
Main.cpp:72:65: note: in expansion of macro 's'
72 | update(1, 1, n, index(segments[R].f), index(segments[R].s, 1));
| ^
In file included from /usr/include/string.h:432,
from /usr/include/c++/10/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:48,
from Main.cpp:1:
/usr/include/strings.h:61:1: note: candidate: 'const char* index(const char*, int)' (near match)
61 | index (const char *__s, int __c) __THROW
| ^~~~~
/usr/include/strings.h:61:1: note: conversion of argument 1 would be ill-formed:
Main.cpp:7:11: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
7 | #define s second
| ^
| |
| int
Main.cpp:72:65: note: in expansion of macro 's'
72 | update(1, 1, n, index(segments[R].f), index(segments[R].s, 1));
| ^