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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AnsiString to char*

Status
Not open for further replies.

szcygan

Programmer
Jul 18, 2001
19
0
0
PL
I know it should be simple, but I can't figure it out: I need to change a String (FileName form OpenDialog) to a *char to use it in fopen(..) function. How can I do it?
 
Try this
char str[255];
strcpy(str,my_ansi_string.c_str());

That'll get your AnsiString into an array of chars. Common sense is what tells you the world is flat.
 
That was a quick, and excellent reply, thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top