Computing.Net > Forums > Programming > Word/Sentence/Character Count in C

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Word/Sentence/Character Count in C

Reply to Message Icon

Name: Scott
Date: December 10, 2003 at 12:35:00 Pacific
OS: WinXP Home
CPU/Ram: P3 900, 640
Comment:

Two Posts in One Day Is A First For Me LOL -Anyway, I'm still working on my final program, which is basically an extremely crude text editor. This time, I have a problem with counting words/characters/setences in an exisiting text file. I've tried everything I can think of, I've used fgetc, fgets with counters in every kind of combination and loop imaginable. any help would be greatly appreciated!



Sponsored Link
Ads by Google

Response Number 1
Name: myxp
Date: December 10, 2003 at 14:41:50 Pacific
Reply:

Scott:

First function is C, rest is C++:

#include<string.h>

char *strstr(const char *string, const char *substring)

const char *strstr(const char *string, const char *substring)

char *strstr(char *string, const char *substring)

Return value is a pointer to where
"substring" begins in "string".

If "substring" doesn't exist, return value
is null.


MYXP


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Word/Sentence/Character Count in C

FOR loops & Character Display in C www.computing.net/answers/programming/for-loops-amp-character-display-in-c/8438.html

zipf in C www.computing.net/answers/programming/zipf-in-c/1798.html

Null Character in C? (NOT '\0') www.computing.net/answers/programming/null-character-in-c-not-0/3201.html