1. Engineering
  2. Computer Science
  3. c can someone please explain why i keep getting this...

Question: c can someone please explain why i keep getting this...

Question details
C++: Can someone please explain why I keep getting this error? When I comment out this function Trendtracker::tweeted(), it doesn’t give me this error. Would appreciate any help. Thank you!
libo+wabi.dylib: terminating with uncaught exception of type std::out_of_range: vector Program ended with exit code: 9 All Output ¢ Filter
53 54 55 1 Adds 1 to the total number times a hashtag has been tweeted. 56 I If the hashtag does not exist in TrendTracker, does nothing. 57 I1 58 /1 Must run in 0(n) time. 59 void Trendtracker::tweeted(string ht)t for (int ǐ = e; ǐ < E.size(); ǐ++){ if (Elil.hashtag ht)t 61 E[i],pop += 1; else t contfnuc 65 67 // Returns the number of times a hashtag has been tweeted. n If the hashtag does not exist in Trendtracker, returns -1. 72 73 II Must run in 0(n) time. 74 int Trendtracker::popularity(string name) 75 76 int found-1; for (int į =0; ǐ < E.size(); ǐ++){ 78 79 if (ECi].hashtagname)
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution