Relative Content

Tag Archive for cif-statement

Visual Studio ignoring if statement

I’m reading in data from a JSON file and removing thewhotespace so it’s usable. After removing the whitespace from the collider type data it seems to not srigger the if statement at all. I’ve set a break point inside the if and else satements and it seems to skip both and go to the end of the loop instea

C++ doesnt execute if clauses right || WHY?

// Generates the base of the config | Генерирует базу конфига std::string generate_config() { std::string OS = getOsName(); bool isYCinstalled = checkYCExistance(); // 1 std::string folderID; std::string IAMtoken; std::string lang; int choosings[4]; printf(“At first, let’s pick a language:nСначала, выберем язык:nСпочатку, виберiмо мову:nn”); printf(“0. Englishn1. Русскийn2. Українськаn”); scanf(“%i”, &choosings[0]); if (OS == “ubuntu”) // yes { […]

I can”t control the if(wang[0]||wang[1]||wang[2]||wang[3]) even if Iput if(0) also it can’stop,unless I explantaory note it

`#include “cassert” #include “calc.h” const string a[] = { “零”,”壹”,”贰”,”叁”,”肆”,”伍”,”陆”,”柒”,”捌”,”玖” }; const string b[] = { “元”,”拾”,”佰”,”仟”,”萬”,”亿”}; string Xs(const int k[]){ string c; c+=a[k[1]],c+=”角”,c+=a[k[0]],c+=”分”; return c; } string Yuan(const int k[]) { string c; if (k[0] == 0) { if (k[1] == 0) { if (k[2] == 0) { if (k[3] == 0)c+=a[0]; else c+=a[k[3]],c+=b[3]; […]

If statement runs while condition is false

Basically the if statement is supposed to break the while loop if the user inputs no, however no matter what I input, the while loop breaks. I’m not sure if the issue is actually with the if statement or the while loop.