Mar 4, 2019 02:58 PM
(This post was last modified: Mar 4, 2019 03:00 PM by F.A.S.T.)
code (Click to View)
Hi, I want to know if this explanation of the ternary Operator. Using the Code above, Is valid or not.
Here goes;
A Variable with a Condition. If the condition is something than the Value of the Variable will be something. But if it's not the value will be different. Basically assign a Variable with a value based on a condition. Is this explanation valid? I need to know this.
Also, Is there any alternative of the Following python code in C++? (For this currently I am using strings)
array with different data types (Click to View)
Hi, I want to know if this explanation of the ternary Operator. Using the Code above, Is valid or not.
Here goes;
Code
var = (condition) ? set value if condition one : set value of condition two;A Variable with a Condition. If the condition is something than the Value of the Variable will be something. But if it's not the value will be different. Basically assign a Variable with a value based on a condition. Is this explanation valid? I need to know this.
Also, Is there any alternative of the Following python code in C++? (For this currently I am using strings)
array with different data types (Click to View)



![[Image: 0DvFxnA.gif]](https://i.imgur.com/0DvFxnA.gif)