Let me first say that the filepath is not in " " because when it is it tells me \k (part of the path) is not a valid escape sequence.
PHP Code:
--------------------Configuration: test - Win32 Debug--------------------
Compiling...
test.cpp
C:\Documents and Settings\NEKEY\Desktop\test.cpp(15) : error C2065: 'c' : undeclared identifier
C:\Documents and Settings\NEKEY\Desktop\test.cpp(15) : error C2143: syntax error : missing ')' before ':'
C:\Documents and Settings\NEKEY\Desktop\test.cpp(15) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
C:\Documents and Settings\NEKEY\Desktop\test.cpp(15) : error C2017: illegal escape sequence
C:\Documents and Settings\NEKEY\Desktop\test.cpp(15) : error C2059: syntax error : ')'
C:\Documents and Settings\NEKEY\Desktop\test.cpp(19) : error C2065: 'a_file' : undeclared identifier
C:\Documents and Settings\NEKEY\Desktop\test.cpp(19) : error C2297: '<<' : illegal, right operand has type 'char [45]'
C:\Documents and Settings\NEKEY\Desktop\test.cpp(23) : error C2228: left of '.close' must have class/struct/union type
C:\Documents and Settings\NEKEY\Desktop\test.cpp(27) : warning C4129: 'k' : unrecognized character escape sequence
Error executing cl.exe.
test.obj - 8 error(s), 1 warning(s)
Code:
#include <fstream.h>
#include <iostream.h>
int main()
{
char str[10];
//Used later
ofstream a_file(c:\keywords.txt);
//Creates an instance of ofstream, and opens example.txt
a_file<<"This text will now be inside of keywords.txt";
//Outputs to example.txt through a_file
a_file.close();
//Closes up the file
ifstream b_file(c:\keywords.txt);
//Opens for reading the file
b_file>>str;
//Reads one string from the file
cout<<str;
b_file.close();
//Do not forget this!
return 0;
}