can anyone “translate”/ convert this python code to C++ code. Itneeds to read in a file and using Circular Doubly Linked Lists readtext “tweets” from a file and run various functions depending onthe users’ input.
here is what libraries and other files I am using
#include <fstream>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <string>
#include <string.h>
#include “cdll.h”
#include “cdll.cpp”
and here is an example from what our txt file “tweets” lookslike:
521961575909826561|Tue Oct 14 09:51:51 +0000 2014|Fly genes holdclue to human illness http://bbc.in/1tZpN7f
521833968388153345|Tue Oct 14 01:24:47 +0000 2014|Heathrow to startscreening for Ebola http://bbc.in/1CfaPhV
python code:
import sys
tweets = []
with open(sys.argv[1]) as fid:
for line in fid:
tweets.append(line.strip().split(‘|’))
tweets = tweets[::-1]
n_tweets = len(tweets)
current = 0
while