expected primary-expression before '=' token

decide.h|5|error: expected primary-expression before '=' token|
That is the error I get when trying to compile. I have worked on it for hours and still could not figure it out. Any help is much appreciated.

The code below is one header of a much larger program. I have only found syntax errors in this file.
Anyway here's the code:
decide.h:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
int decide(char option)
{
    {
        if (option === 'y')
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
}
There is no '===' operator. I think you meant '=='
LOL yea what firedraco said

'=' = to assign something to something

'==' = if something equals this value

'===' = is not an operator
Thanks, I guess I got c++ confused with javascript.
also this function is a little ridiculous.

Same effect:

1
2
3
4
bool decide(char option)
{
    return (option == 'y');
}
Topic archived. No new replies allowed.