Help about console application [c++]

Hi Guys ,

I want make a program for check to text and if the a text and b text is same
say to me ok and if it's not same say to me no
but i've problem plz check this source for me and tell me where is the problem :D


#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int a,b;
cout << "\n Enter text 1:";
cin >> a;

cout << "\n Enter text 2:";
cin >> b;

if (a=b){
cout <<"\n ok";
}
else {
cout <<"\n no";
}

system("PAUSE");
return EXIT_SUCCESS;
}


plz give me true source TNX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int a,b;
cout << "\n Enter text 1:";
cin >> a;

cout << "\n Enter text 2:";
cin >> b;

if (a == b){
cout <<"\n ok";
}
else {
cout <<"\n no";
}

system("PAUSE");
return EXIT_SUCCESS;
}



Hope you see the difference.
Hi Tnx for attention , but it dont work !
when i run it it say enter text 1 i enter [Hi] then i push enter and it dont let me to enter text 2 ! and ...
check codes plz and help me :((((
TNX
Last edited on
my friest source when i test it it say ok you source say no :D just it's different in run the program :D [dont work ]
Topic archived. No new replies allowed.