|
[Sponsors] |
August 13, 2020, 07:02 |
error: no match for ‘operator<=’
|
#1 |
New Member
marian enache
Join Date: Aug 2020
Posts: 1
Rep Power: 0 |
Hello. I am new to c++ and i get the error in the title. Can please someone let me know the mistakes i am doing? Bellow is the code.
#include<iostream> using namespace std; int main() { int a, b, c; cout<<"input a value for a: "; cin >> a; cout<<"Input a value for b: "; cin >> b; cout << "Input a value for c: "; cin >> c; cout << endl; cout << a + 2.5; cout << a <= b; return 0; } |
|
August 18, 2020, 00:43 |
|
#2 |
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 18 |
You need to add parentheses around your logical expression:
Code:
cout << (a <= b); |
|
Tags |
c++ |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Errno = 1 in OpenFOAM | rfiore1 | OpenFOAM Bugs | 2 | November 1, 2022 18:35 |
createPatch Segmentation Fault (CORE DUMPED) | sam.ho | OpenFOAM Pre-Processing | 2 | April 21, 2014 03:01 |
Match Control and Symmetry Boundary Condtions in a quasi 2D calculation | peterputer | ANSYS Meshing & Geometry | 0 | May 15, 2012 09:53 |
gmsh2ToFoam | sarajags_89 | OpenFOAM | 0 | November 24, 2009 23:50 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |