Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My problem is my program is completely ignoring the second member function of my first class. The 2nd function is just supposed to ask for what time it is and return it in military format. I created a third function to avoid the object for my first class in main repeating the 2nd function twice, however now it completely ignores the 2nd part of the && condition.

I am pretty sure I know why, as it is being returned as a value of zero, but perhaps I am wrong.
edit: For some reason it isn't letting me post my code. code - Pastebin.com[^]

What I have tried:

C++
#include
Posted
Updated 30-Sep-16 15:18pm
v9

1 solution

Quote:
it completely ignores the 2nd part of the && condition.
This is the behaviour of &&.
In result = func1(args) && func2(moreargs); if func1 returns false then func2 will never be called.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900