Re: [Dev-C++] Possibility to get a string out of a char* or cstring
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jonathan W. <jon...@gm...> - 2007-07-23 13:40:53
|
Hi, I believe the fourth constructor is what you need: http://www.cppreference.com/cppstring/string_constructors.html Cheers, Jonathan On 7/23/07, Wagner, Frank <F.W...@wi...> wrote: > > Hi, > > I wrote a commandline tool that users the argv argument like > -f=3Dfilename.txt. > My problem is that argv is defined as char* but I would like to get the > filename.txt converted to a c++ string wich comes with <string> not > <cstring>. > Does someone has a solution how to convert from cstring to string? > > Thanks in advance > > Frank > -- > WIKA Alexander Wiegand GmbH & Co. KG > Alexander-Wiegand-Stra=DFe 30 - 63911 Klingenberg - Germany > Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA > 1819 > Komplement=E4rin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenb= erg > - > Amtsgericht Aschaffenburg HRB 306 > Gesch=E4ftsf=FChrer: Alexander Wiegand > Telefon: (09372) 132-0 > Internet: www.wika.com > -- > The information contained in this E-mail and any attached files are > strictly confidential and may be subject to legal privilege. If you are n= ot > the intended recipient, his representative or the person responsible for > delivering the message to the intended recipient, be advised that you hav= e > received this message in error and that any dissemination, copying or use= of > this message or attachment is strictly forbidden, as is the disclosure of > the information therein. If you have received this E-mail in error, pleas= e > notify us immediately by E-mail or telephone and delete this message and = all > its attachments subsequently. All reasonable precautions have been taken = to > ensure no viruses are present in this E-mail. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > --=20 <Morpheus> linux, c'est une question de VI ou de MORE |