< and > as characters in C?
#3
@ab1jx This is a coding problem, not a Pinebook Pro problem.

In the case you want help, you should post a small snippet of your code that demonstrates the problem. I highly doubt both gcc and clang have some problem, especially given all the programs running on your machine were compiled with one of those and all seem to work.

Regarding the search function strstr() [1]:

1. Sanity check that the example given in tutorialspoint works [1] - if it doesn't, you really have massive problems.

2. Does the haystack contain the full string? Try printing it... Perhaps you are not getting the result you think you are from the GET request.

3. Is there a NULL character `\0` early on in the string?

4. Remember that strstr() is going to return a pointer to the offset where the string was found - not the offset in the string, so you need to check it against NULL. If you try to do something like `haystack[strstr(haystack, needle)]` you will almost certainly segmentation fault.

[1] https://www.tutorialspoint.com/c_standar...strstr.htm
  Reply


Messages In This Thread
< and > as characters in C? - by ab1jx - 01-18-2021, 06:16 PM
RE: < and > as characters in C? - by ab1jx - 01-18-2021, 07:38 PM
RE: < and > as characters in C? - by barray - 01-18-2021, 08:59 PM
RE: < and > as characters in C? - by ab1jx - 01-19-2021, 06:47 AM
RE: < and > as characters in C? - by barray - 01-20-2021, 04:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Keyboard types random characters erock22 10 10,944 10-30-2020, 08:53 PM
Last Post: erock22
  Darktable - characters are square PaulQ 7 10,003 09-13-2020, 10:38 PM
Last Post: kenigan

Forum Jump:


Users browsing this thread: 3 Guest(s)