-
Refugee
Another question....
I would like to know if there was any way that I could extend the limits of a char array (or whatever it is called) beyond 256 (or whatever the limit is) so I would be able to make some sort of cheap version of a word processor and save it to a file. And also, how would I be able to enable the user to create their own title. Here is my code to help you...
#include <iostream>
#include <fstream>
using namespace std;
main()
{
ofstream output;
output.open("file.txt");
char text[256];
cin.getline(text,256);
output << text;
output.close();
int var1, var2, var3, var4;
}
As you can see, the file name is automaticly specified as "file.txt". And "text" is set to a limit of 255 characters. Some guy on this board wrote code similar to this and he included the line :
"int var1, var2, var3, var4;" in it. Is this really necessary for the program to work?
I know it's alot of questions, but I am only 13 (14 in two weeks from tommorrow) and I am still learning.
Thanks
-Chris
-