`int main ()` doesn't let the code running
shiroinekotfs opened this issue · 1 comments
shiroinekotfs commented
The code I run
#include <iostream>
int main () {
jdisplay::YouTubePlayer("https://www.youtube.com/watch?v=BwewsbFMIcs", "1280", "720");
return 0;
}
The error it returned:
/tmp/tmpu6u6r47y.cpp: In function ‘int main()’:
/tmp/tmpu6u6r47y.cpp:8:13: error: a function-definition is not allowed here before ‘{’ token
8 | int main () {
| ^
[C++ 14 kernel] Interpreter exited with code 1. The executable cannot be executed
shiroinekotfs commented
The replacement of:
220 if not re.search(r'int\s+main\s*\(', code):
by this new RegEx:
if not re.search(r'int\s+main\s*\(\s*\)', code):
has extended the code functionality. I will review this line whenever the PR is ready.