i need to add two numbers in c++ ,.can you help me ?

Basically just use the + operator.

int a = 1;
int b = 2;
int c = a + b;
int d = 1 + 2;
int e = a + 2;
int f = 1 + b;
commented: This is an obvious schoolwork problem. Please let the poster try to solve it first! :-) -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.