# Output File

**URL:** <https://forum.kirupa.com/t/output-file/304166>\
**Category:** programming\
**Created:** [February 2, 2010, 5:35pm UTC](https://forum.kirupa.com/t/output-file/304166 "2010-02-02T17:35:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lairusi](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@lairusi](https://forum.kirupa.com/u/lairusi)\
**Post date:** [February 2, 2010, 5:35pm UTC](https://forum.kirupa.com/t/output-file/304166/1 "2010-02-02T17:35:33Z")

</div>

Hello newbie question. I am currently learning how to program in C++ and I have the following code.

```auto

#include <iostream>
#include <fstream>
using namespace std;

void main () {
  ofstream myfile;
  myfile.open ("C:\	est.txt");
  myfile << "Hello World";
  myfile.close();
}

```

When I went to my C:\ Directory, I don’t see any test.txt, but if I changed the directory to D:\, the test.txt appears. However, what I really need is the test.txt to appear in the C:\ directory. Am I missing something here or has anyone also encountered the same problem?

Thank you.
