Another C++ problem
Another C++ problem
I've been making one program for weeks when suddenly I realised that I don't know how to scipt save fuction. Please, I desperatly need help!!
Lithuanians for Georgia!
Saving what, a file?
Code: Select all
#include <fstream>
ofstream file("filename.txt");
file << "Some text.\n";
file.close();
Last edited by AndyCR on Mon Jun 04, 2007 6:37 am, edited 1 time in total.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
- psychopath
- Posts: 32
- Joined: Wed Jul 13, 2005 4:05 am
- Location: Where circles begin.
- Contact:
Thanks! Fixed.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
There are lots of EditBoxes(It's where you can write text or numbers). And it would be stupid to fill in those EditBoxes again and agina everytime I run the program. So isn't there pre-made button that does that. I want that when I fill these EditBoxes and close the program and run it again EditBoxes would be filled with same stuff I filled it last time I opened them
Lithuanians for Georgia!
I've started using VC++ Express edition now and I to use that thing that I've quated again. But where am I supposed to write #include <fstream>?AndyCR wrote:Saving what, a file?
Code: Select all
#include <fstream> ofstream file("filename.txt"); file << "Some text.\n"; file.close();
Lithuanians for Georgia!
Another...
I've just downloaded VC++ 2008 9.0 Beta and I'm using it now but I don't think scripting language has changed. So here's my new prob: I want this to happen: when I press button 1 new form(it's called 'Favorites') appears. How do I do that?
There's an error in that 'Favorites::Activate()' line. So how should I do it? Must I include some files somewhere? Thanks in advance and if these questions are annoying just tell
Code: Select all
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
Favorites::Activate()
}
Lithuanians for Georgia!
I'm not familiar with .NET, but you're missing a semicolon.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085