GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Feb-2006, 20:44
blstretc blstretc is offline
New Member
 
Join Date: Jan 2006
Posts: 10
blstretc is on a distinguished road

Extracting info from a string...


hi guys, im having a little problem i cant figure out how to extract info from a string. the format for my strings is (lastname, firstname, city, phone number i need to make functions that will extract one of the four piece of info...i have no clue what to do here, i know how to skip through a scanf function when searching a file, but ive got no clue what to do here with making a function do it.

thanks for any help.

brendan.
  #2  
Old 16-Feb-2006, 21:35
davis
 
Posts: n/a

Re: Extracting info from a string...


Quote:
Originally Posted by blstretc
hi guys, im having a little problem i cant figure out how to extract info from a string. the format for my strings is (lastname, firstname, city, phone number i need to make functions that will extract one of the four piece of info...i have no clue what to do here, i know how to skip through a scanf function when searching a file, but ive got no clue what to do here with making a function do it.

thanks for any help.

brendan.

Take a look at strtok...and the guidelines for posting help requests.


:davis:
  #3  
Old 17-Feb-2006, 16:55
blstretc blstretc is offline
New Member
 
Join Date: Jan 2006
Posts: 10
blstretc is on a distinguished road

Re: Extracting info from a string...


umm ok, wats strtok do?? i cant find anything here on its use...
  #4  
Old 17-Feb-2006, 17:49
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,245
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: Extracting info from a string...


Define exactly what your format is so we know what to tell you.

Have you read the Guidelines? Especially #1 & #2
__________________

Age is unimportant -- except in cheese
 
 

Recent GIDBlogWriting a book by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read a .html file, check that file for links salemite C Programming Language 10 17-Jan-2008 07:56
variables return to previous value after i try to set them nasaiya MS Visual C++ / MFC Forum 2 14-Jun-2005 00:43
Help wit my source code compiler errors Krandygrl00 C++ Forum 1 06-Jun-2005 08:14
Converting string to float CT++ C++ Forum 2 10-May-2005 11:29
C++ string from file small_ticket C++ Forum 3 05-Jan-2005 07:29

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:46.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.