
LANGUAGE: C++
CHALLENGE:
Given the availability of an ofstream object named output, write the other statements necessary to write the string “3.14159″ into a file called pi. (Do not define a main function.)
SOLUTION:
output.open("pi"); output << ""3.14159""; output.close();
output.open(“pi”);
output << "3.14159";
output.close();
this one works (extra quotes)
output.open(“pi”);
output << "3.14159";
output.close();
output.open(“pi”);
output << "3.14159";
output.close();