Can anyone tell me how to search in a string?
gallantmon1
0
Light Poster
Recommended Answers
Jump to Postlook for a list of string functions in C.
Jump to PostTry something like that.
main() { char no[5], str[10], cmd[5], op[20]; FILE* input = fopen("input4.txt","r"); while(!feof(input)) { fscanf(input, "%s %s %s %s", &no, &str, &cmd, &op); //no, str, cmd, operand char *search=","; char *op1=strtok(op, search); char *op2=strtok(NULL,search); char *op3=strtok(NULL,search); //you can transform this into some other output …
All 5 Replies
yagiD
0
Light Poster
gallantmon1
0
Light Poster
VernonDozier
2,218
Posting Expert
Featured Poster
yagiD
0
Light Poster
gallantmon1
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.