Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I convert a string to a char ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all,

...maybe a stupid question:

How can I convert a string to a char?

-->

rename (oldname,newname);

-- my problem is, that "newname" is a string and therefore the renaming doesn't work.

any Idea?

Her.Wig
 
try newname.begin() instead of newname. John Fill
1c.bmp


ivfmd@mail.md
 
Replace "newname" by "newname.c_str()"

It will help you

hnd
hasso55@yahoo.com

 
definately what hnd said... thats what works.
(rename(oldname, newname.c_str()); Cyprus
 
definately what hnd said... thats what works.
(rename(oldname, newname.c_str())); Cyprus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top