OK. This is my first post on this site, and I consider myself quite a beginner in C++. I want to know how to open up a
document using C++. Ive tried many times, but it just comes up with a blank console which goes away when I press
enter. I suspect the problem is that I am making a cionsole application instead of some other application that I sgould be using. (I am using Miscrosoft Visual C++ 2010) I really do not know why this is not working. Is it because I am
trying to open a document that is not allowed to be opened???? (Im an adminstator on my computer so that is
proobably not it.) Anyway here is the code that I wrote:


Code:
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
	ofstream wordDocument;
	
	wordDocument.open("C:\\Users\\Haziqu\\Documents\\STUDYING STUFF\\BUSINESS\\adding value #1.txt.txt");

	cin.get();
	return 0;
}
Thanks!