cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
If statement fix?
If statement fix?
Aug 18, 2020 at 9:23am UTC
jkwok678
(13)
Any idea how to fix this If statement?
So I want the program to go into the if section if there is a switchTrack->getlink5 is true and track5->getFound is False,
and the last link variable isn't equal to 2 or 8
1
2
if
((switchTrack->getLink5() && !track5->getFound()) && (lastLink != 2 || lastLink != 8))
Last edited on
Aug 18, 2020 at 9:27am UTC
Aug 18, 2020 at 9:28am UTC
lastchance
(6980)
Change the last || to &&
Topic archived. No new replies allowed.