Jaagrav / CodeX

CodeX is an online compiler for various languages like Java, C++, Python, etc. Execute code in various languages on your own website for free with the CodeX API!!!
https://codex.jaagrav.in/
268 stars 65 forks source link

Getting issue in string program #10

Closed VishalSingh28 closed 2 years ago

VishalSingh28 commented 2 years ago

Enter string s1: String s2: Akasg

./Playground/file0.c: In function 'main': ./Playground/file0.c:7:19: warning: array subscript has type 'char' [-Wchar-subscripts] 7 | for (i = 0; s1[i] != '\0'; ++i) { | ^ ./Playground/file0.c:8:11: warning: array subscript has type 'char' [-Wchar-subscripts] 8 | s2[i] = s1[i]; | ^ ./Playground/file0.c:8:19: warning: array subscript has type 'char' [-Wchar-subscripts] 8 | s2[i] = s1[i]; | ^ ./Playground/file0.c:11:7: warning: array subscript has type 'char' [-Wchar-subscripts] 11 | s2[i] = '\0'; Capture

ZakGhost354313 commented 2 years ago

http://cpp.sh/937f4

image image image

I got the same errors in C++ Shell, with the input "this is a test"

ankanroy-code commented 2 years ago

Screenshot from 2022-05-29 11-26-33

works fine in my GCC 11.3.1 offline

the problem with how input is handled in the server or a GCC version problem....

Jaagrav commented 2 years ago

Please add this issue on the new repo for the backend of the Codex API here: https://github.com/Jaagrav/CodeX-API