What parameter does the constructor to an ofstream object take?



What parameter does the constructor to an ofstream object take?..

Answer / Dhiraj Pratap

The constructor for an ofstream object takes a character string as a parameter. This character string specifies the name of the file to which data will be written.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is a constructor initializer list and when we use constructor initializer list?

3 Answers   Soft Info, TCS,


Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.

1 Answers  


What is pointer with example?

1 Answers  


Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it guys i am waiting for your reply

3 Answers  


Can recursive program be written in C++?

1 Answers  


Explain the use of virtual destructor?

1 Answers  


What is abstraction in c++ with example?

1 Answers  


What is the type of 'this' pointer? When does it get created?

1 Answers  


What is c++ map?

1 Answers  


Write bites in Turbo c++ Header ("Include") Files.

1 Answers  


What is an associative container in c++?

1 Answers  


What are smart pointers?

4 Answers  


Categories