|
|
|
|
![]() ![]() |
Oct 8 2008, 07:32 PM
Post
#1
|
|
|
Newbie [ Level 2 ] 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! |
|
|
|
Oct 8 2008, 07:48 PM
Post
#2
|
|
|
Colonel Panic 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 |
|
|
|
Oct 9 2008, 11:47 AM
Post
#3
|
|
|
Advanced Member 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 |
|
|
|
Oct 9 2008, 01:22 PM
Post
#4
|
|
|
Way Out Of Control - You need a life :) 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. |
|
|
|
Oct 10 2008, 12:23 PM
Post
#5
|
|
|
Advanced Member 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. |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 2nd December 2008 - 02:42 PM |