![]() |
|
#1
|
|||
|
|||
strcat(); function helpi know that this is probably a noob question but wutever. i am trying to figure out how to use the strcat(); function by testing it in a program, but it doesn't work. here is my code (fyi i am using windows xp not linux although i want to use linux...):
CPP / C++ / C Code:
please help me. i would really appreciate it! Last edited by JdS : 02-Oct-2004 at 11:44.
Reason: Please insert your example C/C++ codes between [c] and [/c] tags
|
|
#2
|
|||
|
|||
|
Quote:
strcat() is used with c-style strings (null-terminated array of chars). Here's an example: CPP / C++ / C Code:
With the C++ string class, concatenation of strings is performed with the "+" operator. Here's an example: CPP / C++ / C Code:
With c-style strings, you must allocate enough storage to hold the largest string that you will ever store in that array. With the C++ string class, strings are automatically re-sized as you perform operations. Regards, Dave |
|
#3
|
|||
|
|||
|
Quote:
thank you dave! |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Revising Script style ?????? | pepee | MySQL / PHP Forum | 4 | 14-Apr-2004 04:59 |
| Another problem dealing with main() and driver function | tommy69 | C Programming Language | 4 | 20-Mar-2004 19:46 |
| Calling functions within a function | spudtheimpaler | C Programming Language | 5 | 02-Mar-2004 08:02 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The