converting strings in c++

DeRusto

Golden Member
May 31, 2002
1,249
0
86
hey guys..i just tried google for this but my search was uneventful..

can anyone tell me the name of the function(i believe there is a function for this) that would turn a string into a null-terminated char array?

I want to simply cin to a string and use that string, for instance, in f.open(string) but i know that f.open() will only accept a null-terminated char array.

I know of other ways to do this, but this is pretty much the simplest way and the name of said function is not available in my mind.. thanks for any help:)
 

DeRusto

Golden Member
May 31, 2002
1,249
0
86
i know you can do that..but then you have a fixed length array versus a variable length string..i just prefer it this way better..