Anyone Translate Convert Python Code C Code Needs Read File Using Circular Doubly Linked L Q37097952

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

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.