Help me with this:
I wanted to make a program where it allows me to open and add new Data by just a console program.
Code:
#include <ofstream>
#include <iostream>
// Run
int main ()
{
// We assign the stream library to var stm
ofstream stm; // Do I need to make this a pointer???
// My vars/pointers
char FILE;
char CONTENT;
int IF_REMOV_TRUE;
// Input the file specified to open it
std::cin >> FILE;
stm.open(FILE); // Open
if (stm != NULL) // Checks to see if its not working
{
// Allows the user to add content
std::cin >> CONTENT;
stm.put(CONTENT);
}
// I was going to add remove but I need help with the current error.
std::cin >> IF_REMOV_TRUE;
cin.get();
stm.close();
return 0;
}
My Compiler comes back with this:
Cannot open include file: 'ofstream': No such file or directory
I'm using Visual Studio 08