#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include <bits/stdc++.h>
using namespace std;
int main(){
while (true)
{
cout << "$ ";
char ui[999];
cin.getline(ui, sizeof(ui));
if(ui == "clear")
{
system("cls");
}
else
{
system(ui);
}
}
}
It will run the else even if ui equals clear. Is it because its a char array and not a string?. Or is it because of system()?