Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] C++ Save&Load Value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Sharel972
Newbie cheater
Reputation: 0

Joined: 02 Nov 2009
Posts: 24
Location: israel

PostPosted: Thu May 12, 2011 7:36 am    Post subject: [C++] C++ Save&Load Value Reply with quote

Hi
here is what i want to do :


Code:

if(checkBox1_CheckedChanged_1){
          System::IO::StreamWriter^ sw = gcnew StreamWriter("1.txt");
                 sw->WriteLine(txtId->Text);
                 sw->WriteLine(txtPassword->Text);
                                         sw->WriteLine("1"); //chackbox...
                 sw->Flush();
       sw->Close();
}

System::Void Form1_Load ... {


                 System::IO::StreamReader^ sp1 = gcnew StreamReader("1.txt");
                sp1->Peek() == 1;
                this->txtId->Text = sp1->ReadLine();
                 sp1->Peek() == 2;
                this->txtPassword->Text = sp1->ReadLine();
                                         sp1->Peek() == 3;
                                        if(ReadLine = 1) {
this->chackbox1->chacked = true;}
                sp1->Close();
}




i can't do it cus i cant do "if" on text .
some one have solution ?
Back to top
View user's profile Send private message MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Thu May 12, 2011 9:14 am    Post subject: Reply with quote

I am confused by what you mean, "I can't do if on text". Do you mean that you cant do comparisons on text using the standard '=='? C++ string class has a compare() method for this purpose. Explain your problem a little more. Also show in your code where the problem is. Maybe explain your problem in english.
_________________
Back to top
View user's profile Send private message
M.CORP
Grandmaster Cheater Supreme
Reputation: 28

Joined: 28 Oct 2009
Posts: 1010

PostPosted: Thu May 12, 2011 10:54 pm    Post subject: Reply with quote

I think he placed the 'if' statement on the wrong section of the code.
Coz look, the if doesn't have something that would trigger it, eg. button.

_________________
Shameless Self Advertising Very Happy!
Steam
Just lurking around...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites