Can't find out why
#include <iostream> #include <deque> #include <ctime> #include <cstdlib> bool isWork(){ bool isWork = false; int randdom = rand()%2; return(rand == 0?isWork = false:isWork = true); } int FriendsOfMine(std::deque<std::string> friends, int amount){ bool isTrue = isWork; std::cout << amount;//it doesn't outputs //anything std::string ally, howard, john, thom; if(isTrue){ amount == 0?ally = "works":amount == 1?howard = "works":amount == 2?john = "works":amount == 3?thom = "works":thom = " "; return amount; } return(friends, amount += 1); } int main() { srand(time(NULL)); std::deque<std::string> b; std::string alice, bob; b[0] = alice; b[1] = bob; FriendsOfMine(b, 0);//here i called this //function return 0; } I will appreciate your helpđ