| | |
syntax error
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2005
Posts: 91
Reputation:
Solved Threads: 0
hey guys, I am using the following code to count from a text file but I also want to check for ",jo " as well as "jo " I was trying to do it by using while((ch = strstr( ch, "jo ")) != 0) || while((ch = strstr( ch, ",jo ")) != 0) but this doesn't work I was just wondering how I could so this thanks.
C Syntax (Toggle Plain Text)
char *ch=array; while((ch = strstr( ch, "jo ")) != 0) if( ch == array '||isspace (*(ch-1))) { temp.count++; ch++; } else { break; } }
Use this.
Note:
I am not sure about the logic, that is your responsibility. But the syntax is okay.
C Syntax (Toggle Plain Text)
while( ( (ch = strstr( ch, "jo ") ) != 0) ||( (ch = strstr( ch, ",jo ")) != 0 ))
I am not sure about the logic, that is your responsibility. But the syntax is okay.
•
•
Join Date: Jul 2005
Posts: 91
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by WolfPack
Nothing. I said that because I didnt know your requirements. If it meets your requirements then it is correct.
![]() |
Similar Threads
- syntax error? .. operator overload method problemo (C)
- syntax error that I just can't seem to find! (Visual Basic 4 / 5 / 6)
- UPDATE syntax error (MySQL)
- Subshell Problem, syntax error...Help please! (Shell Scripting)
- DECLARATION SYNTAX ERROR (for bc 31 user) (C++)
- Parse error, syntax error, Forbids declaration (C++)
Other Threads in the C Forum
- Previous Thread: How to input password in C
- Next Thread: quick sort question
Views: 1277 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays asterisks binarysearch calculate centimeter char command convert copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax directory dynamic executable fflush file fork forloop frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop kernel km lazy linked linkedlist linux linuxsegmentationfault list lists locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix problem probleminc program programming radix recursion recv repetition research scanf scheduling scripting segmentationfault send sequential shape socketprograming spoonfeeding stack standard string strings structures student systemcall testautomation turboc unix user variable visualstudio voidmain() wab win32 windows.h






