while(strcmp(text[k]," ")!=0){
if(strcmp(text[k],"/0")==0){
strcmp() is prototyped as: int strcmp ( const char * str1, const char * str2 );
The first argument passed to it must be a string.text[k] is a character and not a string.
Haven't look at your program logic.
[edit:]
currWord[i]=text[k];
That will not work neither. currWord is a pointer to char not an array of pointers to char
Aia
Nearly a Posting Maven
2,392 posts since Dec 2006
Reputation Points: 2,224
Solved Threads: 218
you could, of course, just use the format modifiers that go with printf()
ex.
printf("%20s",myText);
prints the char string "myText" in a 20-character wide field, left justified, padding unused characters with whitespace.
while printf("%-20s",myText);
does the same thing except the text is right-justified.
you are responsible for ensuring that the length of "myText" does not exceed the length of the specified field.
.
jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
>you could, of course, just use the format modifiers that go with printf()
Sensitive advise.
Examples
Aia
Nearly a Posting Maven
2,392 posts since Dec 2006
Reputation Points: 2,224
Solved Threads: 218