This site is no longer active, all members have migrated to devotedcheating.com . Thankyou
This site is no longer active, all members have migrated to devotedcheating.com . Thankyou
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
Actionhacks.netHomeLatest imagesRegisterLog in

 

 Basic fstream -- Saving files.

Go down 
AuthorMessage
Tate
Admin
Admin
Tate


Posts : 208
Reputation : 17
Join date : 2009-09-19
Age : 27

Basic fstream -- Saving files. Empty
PostSubject: Basic fstream -- Saving files.   Basic fstream -- Saving files. EmptyFri Nov 27, 2009 1:35 pm

This is a very simple thing to do, and can help you if you're ever going to create a hack (If you want to save hack options, or something along those lines).


First, you need to add your includes.
These are the only includes youll need:
Code:
#include <iostream>
#include <fstream>


Next, make sure you tell C++ that you are using namespace std.

add
Code:
using namespace std;

Next, add your main function.

Code:
int main()
{
 
{



Now add this into your main (ill add comments):
Code:
fstream file;
file.open("test1.txt",ios::out);
file << "This is a good message!";   
system("PAUSE");
return 0;



so basicly your source code should be this:

Code:
#include <iostream>
#include <fstream>
using namespace std;

int main()
{
fstream file;
file.open("test1.txt",ios::out);
file << "This is a good message!";   
system("PAUSE");
return 0;
}


any questions, post and I should be able to answer them.
Back to top Go down
 
Basic fstream -- Saving files.
Back to top 
Page 1 of 1
 Similar topics
-
» Creating a Basic trainer for .exe files
» Basic password lock.
» Basic 'Block User Input' program.
» Very Basic assault cube:: Single Player Hacks

Permissions in this forum:You cannot reply to topics in this forum
 :: Public Section: Coding :: C++ :: Tutorials-
Jump to: