how to check if two number are equal = with my begin number

am trying but i don't know how to check if two number are equal = with my begin number :( and after i must know the position but i don't know why can anyone help me ?
the wrong is in the lines 22-28 !!
i want to know which 2 number are equal = this the begin number a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  #include<iostream>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <utility>
using namespace std;

int main (){
int a,b,c;

float p[100000];
int pos = 0;
int pos1;
int pos2;
int sum;

cin>>a;
cin>>b;
for (int i=0; i<=b; i++){
    cin>>p[i];
sort(p,p+b);
do{
    sum=(p[i]+p[i+1]);

}while(sum=a);

}
cout<<p[i]<<p[i+1];
return 0;
}
= is assignment

== is equality comparison
Duplicated Post.

http://www.cplusplus.com/forum/beginner/176480/

P.S.: Have you tried what dhayden told you on the post in the link above?
yes but i don't know how to check which numbers it will give me the correct number that i put in the beggining !!
Topic archived. No new replies allowed.