| | |
Search string in a text file
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
>#define NULL 0
I get a problem with that?
>clrscr();
Why, no need for this or conio.h which is not standard.
Read the following...Looks like you're comparing chars instead of c-style strings.
http://www.daniweb.com/tutorials/tutorial45806.html
I get a problem with that?
>clrscr();
Why, no need for this or conio.h which is not standard.
Read the following...Looks like you're comparing chars instead of c-style strings.
http://www.daniweb.com/tutorials/tutorial45806.html
Last edited by iamthwee; Apr 9th, 2007 at 11:31 am.
*Voted best profile in the world*
use fgets() instead of fgetc() and your program will work better and be a lot less complicated.
delete line 5, NULL is defined in standard c header files.
remove the braces on lines 11, 12 and 13. They are not necessary there.
delete line 5, NULL is defined in standard c header files.
remove the braces on lines 11, 12 and 13. They are not necessary there.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- Please anybody to help to read string value in text file using C# (C#)
- Binary Search on a text file (Java)
- Read in a string from a text file (C)
- New User (C)
Other Threads in the C Forum
- Previous Thread: letter p
- Next Thread: C- Syntax to allocate Global variables to consecutive memory locations
Views: 20487 | Replies: 11
| Thread Tools | Search this Thread |
Tag cloud for C
#include * .net append array arrays bash binarysearch changingto char character cm copyanyfile copypdffile createprocess() database directory drawing dynamic execv feet fgets file floatingpointvalidation fork function functions getlogicaldrivestrin givemetehcodez global grade graphics gtkwinlinux histogram homework i/o ide include infiniteloop initialization input interest intmain() iso keyboard kilometer lazy license linked linkedlist linux list looping loopinsideloop. lowest matrix meter microsoft mqqueue mysql oddnumber odf open openwebfoundation overwrite pause pdf pointer pointers posix power process program programming pyramidusingturboccodes read recursion recv recvblocked reversing segmentationfault single socket socketprogramming spoonfeeding standard strchr string student suggestions system test testing threads unix urboc user whythiscodecausesegmentationfault win32api windowsapi






