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 


[Visual c++] using IF

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Sun Jul 29, 2007 9:07 pm    Post subject: [Visual c++] using IF Reply with quote

well i just started vc++ express today and i made a simple program that will show your message that you typed in the text box. i also made it that if you dont type anything it'll show a message box. but whenever i run it no matter wat i type it makes the message box appear.
Code:
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
             label1->Text = textBox1->Text;
             if (textBox1->Text == (""));
             {
                MessageBox::Show("Enter something>.>");
             }



Untitled.jpg
 Description:
 Filesize:  9.23 KB
 Viewed:  6623 Time(s)

Untitled.jpg



_________________


Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Jul 29, 2007 9:11 pm    Post subject: Reply with quote

use strcmp for text, not ==
Back to top
View user's profile Send private message
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Sun Jul 29, 2007 9:19 pm    Post subject: Reply with quote

Code:
1>c:\users\mon\documents\visual studio 2005\projects\project2\project2\Form1.h(131) : error C2146: syntax error : missing ')' before identifier 'strcmp'
1>c:\users\mon\documents\visual studio 2005\projects\project2\project2\Form1.h(131) : error C2059: syntax error : ')'
1>c:\users\mon\documents\visual studio 2005\projects\project2\project2\Form1.h(131) : error C3861: 'strcmp': identifier not found

i get that error when i try it i tried putting the ) and it still didn't work

_________________


Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Jul 29, 2007 9:21 pm    Post subject: Reply with quote

you're using c++.NET not c++, that's why you can't make use of any useful functions, sorry.
Back to top
View user's profile Send private message
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Sun Jul 29, 2007 9:54 pm    Post subject: Reply with quote

o ok thx. is there a regular visual c++?
_________________


Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Jul 29, 2007 9:56 pm    Post subject: Reply with quote

yes
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Sun Jul 29, 2007 10:00 pm    Post subject: Reply with quote

add <string.h> to stdafx
_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Sun Jul 29, 2007 10:04 pm    Post subject: Reply with quote

can you show me where to find it? i tried microsoft.com and i googled it
_________________


Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Jul 29, 2007 10:05 pm    Post subject: Reply with quote

That's managed C++. You'll need to install the platform SDK to actually develop anything Win32.

PS MessageBox::Show(textBox1->Text);
Back to top
View user's profile Send private message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Mon Jul 30, 2007 2:11 am    Post subject: Reply with quote

if thats managed C++ i think theres 1 tut in the stickies...
_________________
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Jul 30, 2007 4:13 am    Post subject: Reply with quote

appalsap wrote:
yes


I think he expeted a link too Laughing

@ Topic starter

Why do you type in yellow ?
Back to top
View user's profile Send private message
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Mon Jul 30, 2007 9:14 am    Post subject: Reply with quote

idono i just think its bright enough for everyoen to see
_________________


Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Jul 30, 2007 5:36 pm    Post subject: Reply with quote

Robotex wrote:
add <string.h> to stdafx


what he said

dont forget to add librarys that u need... choose the code definition window and then click the syntax. it should come up with up library u need.

_________________
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