I am writing a C program and need to use the equivalent of the C++ substring function to return the 1st 10 characters of a string. Does C have something similar or has anyone had to write their own function?
Here's an easy one for the experience programmers (of which I am not one of). I want to perform a simple search for a string value (eg. labor) in a text line I read in between the line positions of 0 to 10. I have done multiple searches out there and have come across the Boyer-Moore search...
I am a novice C programmer and I am running into the "common" C2106 error when attempting to assign a pointer to a string like the following:
char *pos0;
char pat0[100];
. . .
pat0 = pos0;
I realize that I can't assign a memory pointer directly to a literal string. However, I need...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.