I'm writing a project for a class and I have to have my program read arithmetic expressions from an input file and evaluate them. Unfortunately whenever I try to implement my ternaryCondition.h header my debug throws three

> 
> subexpression.cpp(75):error C4703: potentially uninitialized local pointer variable 'first' used
> 
> 
> subexpression.cpp(75):error C4703: potentially uninitialized local pointer variable 'second' used
> 
> 
> subexpression.cpp(75):error C4703: potentially uninitialized local pointer variable 'third' used
> 
> 
> 

This is my second time working with C++ so I feel like I'm just missing something entirely.

I've tried disabling /sdl checks but when I do that I find that my program can no longer read line by line through my input file and evaluate the expressions.

This is the subexpressions.cpp thats throwing the error up to the 75th line where the error occurs:

```
#include <iostream>

using namespace std;

#include "expression.h"
#include "subexpression.h"
#include "operand.h"
#include "plus.h"
#include "minus.h"
#include "times.h"
#include "divide.h"
#include "greaterThan.h"
#include "lessThan.h"
#include "equal.h"
#include "and.h"
#include "or.h"
#include "negation.h"
#include "ternaryCondition.h"

#include <sstream>

SubExpression::SubExpression(Expression* left, Expression* right)

{

    this->left = left;
    this->right = right;

}

SubExpression::SubExpression(Expression* first, Expression* second, Expression* third)
{
    this->first = first;
    this->second = second;
    this->third = third;
}

SubExpression::SubExpression(Expression* left)
{
    this->left = left;
}

Expression* SubExpression::parse(stringstream& in)

{
    Expression* left;
    Expression* right;
    Expression* first;
    Expression* second;
    Expression* third;
    char operation, paren;
    bool isTernary = false;

    left = Operand::parse(in);
    cin >> operation;
    right = Operand::parse(in);
    if (operation == ':')
    {
        first = left;
        second = right;
        left = Operand::parse(in);
        cin >> operation;
        right = Operand::parse(in);
        if (operation == '?')
        {
            third = right;
            isTernary = true;
        }
    }
    cin >> paren;
    if (isTernary == true)
    {
        return new TernaryCondition(first, second, third); 
//THE LINE ABOVE IS LINE 75 WHERE THE ERROR IS BEING THROWN
    }
    switch (operation)
    {

```

And this is the ternaryCondition.h header in case that could be causing issues:

```
class TernaryCondition : public SubExpression
{
public:
    TernaryCondition(Expression* first, Expression* second, Expression* third) :
        SubExpression(first, second, third)
    {
    }
    int evaluate()
    {
        return third->evaluate() ? first->evaluate() : second->evaluate(); 
    }
};

```

The point of this part of my code is so that the program can calculate expressions like

( ( ( z < ( 50 + aa ) ) & ( bb ! ) ) \* ( ( 3 / cc ) | ( 1 : 0 ? ( z > aa ) ) , z = 4 , aa = 2 , bb = 4 , cc = 2 ;

I'm sorry if I submitted this in a improper format, this is my first time posting.

ADDED THE subexpression.h HEADER FILE:

```
class SubExpression : public Expression
{
public:
    SubExpression(Expression* left, Expression* right);
    SubExpression(Expression* left);
    SubExpression(Expression* first, Expression* second, Expression* third);
    static Expression* parse(stringstream& in);

protected:
    Expression* left;
    Expression* right;
    Expression* first;
    Expression* second;
    Expression* third;
};

```