Simple calculator with classes in C++ I came to C++ from Java. This is my attempt at making a calculator on about 2 days worth of knowledge. I don't really know what is redundant or unnecessary. Nor do I know of the better ways to achieve this effect. 

First class (it does the math):

#pragma once
#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;string&gt;
using namespace std;
class a {
public:
double add(double a, double b) {
    return a + b;
}
double sub(double a, double b) {
    return a - b;
}
double mult(double a, double b) {
    return a * b;
}
double div(double a, double b) {
    return a / b;
}
};


Second class (it makes the strings):

#pragma once
#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;string&gt;
using namespace std;
class text {
public:
string add(double a, double b, double ans) {
    return to_string(a) + " + " + to_string(b) + " = " + to_string(ans);
}
string sub(double a, double b, double ans) {
    return to_string(a) + " - " + to_string(b) + " = " + to_string(ans);
}
string div(double a, double b, double ans) {
    return to_string(a) + " / " + to_string(b) + " = " + to_string(ans);
}
string mult(double a, double b, double ans) {
    return to_string(a) + " * " + to_string(b) + " = " + to_string(ans);
}
string first() {
    return "First Number: ";
}
string second() {
    return "Second Number: ";
}
string op() {
    return "Operator: ";
}
string wrong() {
    return "Invalid Operator!";
}
};


Main method: 

#include "a.h"
#include "text.h"
#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;string&gt;
using namespace std;
int main() {
text ask;
a mather;
string temp;
char op;
double a, b, ans;

cout &lt;&lt; ask.op();
cin.get(op);
cout &lt;&lt; ask.first();
cin &gt;&gt; a;
cout &lt;&lt; ask.second();
cin &gt;&gt; b;


switch (op) {
case '+':
    ans = mather.add(a, b);
    temp = ask.add(a, b, ans);
    break;
case '-':
    ans = mather.sub(a, b);
    temp = ask.sub(a, b, ans);
    break;
case '/':
    ans = mather.div(a, b);
    temp = ask.div(a, b, ans);
    break;
case '*':
    ans = mather.mult(a, b);
    temp = ask.mult(a, b, ans);
    break;
default: 
    cout &lt;&lt; "Invalid Operator!";
}

cout &lt;&lt; temp;
cin.get();
cin.get(); //I don't know how to avoid using this twice
return 0;
}
Welcome to C++.

A few notes:


When working outside of a toy project, avoid using namespace std. For why, see here.
In addition, when working outside of a toy project, I encourage you to define your classes within the scope of a namespace. Only you can fight namespace pollution.
Your a header does not make use of the iostream, string, or stringstream headers. They need not be included in that header.
Your text header does not make use of the iostream or stringstream headers. They need not be included in that header.
Header includes are transitive. Because your main function includes your text header which in turn includes the string header, the main.cpp need not also include string.
Your main implementation file does not make use of the sstream headers. They need not be included in that file. 
Your a class methods made no use of the class instance. That said, these methods could be declared as static.
Your text class methods made no use of the class instance. That said, these methods could also be declared as static.
When you write to the terminal, you probably want a next line character. You can do this either by appending a \n to the output or by calling to std::endl in the iostream header. For more on the distinction, please see this post.
return 0; is actually unnecessary to indicate successful execution of the main function as of C99. reference


Also, please do not return a constexpr char *. Assuming you haven't specified otherwise, your compiler is very likely compiling to the C++ 11 specification. In which case, your string methods will be subject to return value optimization outside of debug mode and no temporary variables or heap allocations will be made.