string editing
-
is it possible to add characters to the beggining or end of a string, ir so where can i learn, thanks a lot
You can use a CString and simply add the strings using + Or you can use strcat if you are using char strings [Better use TCHAR and _tcscat] Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
is it possible to add characters to the beggining or end of a string, ir so where can i learn, thanks a lot
I suspect by string you mean a char *, in which case the answer is strcat. Better to use std::string like this string s = "fish"; s = "eat more " + s; s = s + " to be more fit"; s now equals "eat more fisn to be more fit'. Christian NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
-
I suspect by string you mean a char *, in which case the answer is strcat. Better to use std::string like this string s = "fish"; s = "eat more " + s; s = s + " to be more fit"; s now equals "eat more fisn to be more fit'. Christian NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Christian Graus wrote: s now equals "eat more fisn to be more fit'. What's a fisn? Do they taste good? ;) And they still ran faster and faster and faster, till they all just melted away, and there was nothing left but a great big pool of melted butter
-
Christian Graus wrote: s now equals "eat more fisn to be more fit'. What's a fisn? Do they taste good? ;) And they still ran faster and faster and faster, till they all just melted away, and there was nothing left but a great big pool of melted butter
Peter Hancock wrote: What's a fisn? Do they taste good? Sure do, especially if you have them with chipn. Christian NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma