Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting issue in string program #10

Closed
VishalSingh28 opened this issue Apr 12, 2022 · 3 comments
Closed

Getting issue in string program #10

VishalSingh28 opened this issue Apr 12, 2022 · 3 comments

Comments

@VishalSingh28
Copy link

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
Copy link

http://cpp.sh/937f4

image
image
image

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

@ankanroy-code
Copy link

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
Copy link
Owner

Jaagrav commented May 29, 2022

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

@Jaagrav Jaagrav closed this as completed May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants