Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> String Library Functions, A few questions
NelsonTR4N
post Oct 8 2008, 07:32 PM
Post #1


Newbie [ Level 2 ]
Group Icon

Group: [HOSTED]
Posts: 20
Joined: 8-October 08
Member No.: 33,303



Hi everyone, I have a NEW question

I am learning about strings and I don't understand what some string functions are...

strcpy()
strcat()
strcmp() and
strlen()

"C++ Beginner's Guide by Herbert Schildt" explained what the functions do but I am still confused. I read the functions many times and looked up examples...

If you can explain what each of them are and do, I would be grateful.

Thanks in advance!
Go to the top of the page
 
+Quote Post
xboxrulz
post Oct 8 2008, 07:48 PM
Post #2


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 2,876
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233
myCENTs:50.40



This is discussed at my college's website. Hopefully it would be useful:
http://cs.senecac.on.ca/~btp100/pages/content/sfunc.html

xboxrulz
Go to the top of the page
 
+Quote Post
Darasen
post Oct 9 2008, 11:47 AM
Post #3


Advanced Member
Group Icon

Group: [HOSTED]
Posts: 184
Joined: 3-April 08
From: Milling about
Member No.: 29,596
myCENTs:89.08



That is a good resource xboxrulz, thanks for sharing it with us.

To the OP, perhaps if you let us know where it is that you are losing comprehension we can assist you better.

This post has been edited by Darasen: Oct 9 2008, 11:50 AM
Go to the top of the page
 
+Quote Post
yordan
post Oct 9 2008, 01:22 PM
Post #4


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 2,238
Joined: 16-August 05
Member No.: 7,896
myCENTs:34.00



I suppose that you already know that you use
strcpy() for copying a string from somewhere to somewhere else in your program
strcat() for displaying a string
strcmp() for comparing two strings.
strlen() for knowing the size of a string.
Go to the top of the page
 
+Quote Post
magiccode9
post Oct 10 2008, 12:23 PM
Post #5


Advanced Member
Group Icon

Group: [HOSTED]
Posts: 120
Joined: 7-November 05
Member No.: 9,489



In addition to these functions.
There are other set of functions do the same thing but add one more parameter.

They are strncpy(), strncat() and strncmp()

It will allowed control how many chars to copy.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Programing Windows Joystick(2)
  2. Time Functions Needed(9)


 



- Lo-Fi Version Time is now: 2nd December 2008 - 02:42 PM