At 9/12/2007 05:54 PM, you wrote: >On 9/12/07, Rick <[EMAIL PROTECTED]> wrote: > > > I want to create a string in C++ by starting with a base then adding > > more. In C i would do something like: > > > > char str[128]; > > > > strcpy(str, "first part of string"); > > strcat(str, "--second part of string"); > > > > How would I do this in C++? > >Use the string class. It's part of the C++ standard. > >http://www.yolinux.com/TUTORIALS/LinuxTutorialC++StringClass.html > >-- Brett >------------------------------------------------------------ >"In the rhythm of music a secret is hidden; > If I were to divulge it, it would overturn the world." > -- Jelaleddin Rumi
Thanks, Brett. This helps a lot. One more question. Suppose the strings are coming from argv[]. In C, I'd say: strcpy(Path, argv[1]); strcat(Path, "\\"); strcat(Path, argv[2]); How do I get the argv[] values into C++ strings? ~Rick >To unsubscribe, send a blank message to ><mailto:[EMAIL PROTECTED]>. >Yahoo! Groups Links > > >
