-
December 26th, 2012, 07:04 PM
#1
Opening Documents with C++
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|