online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <map> #include <sstream> #include <fstream> int main() { //this map maps each word in the file to their respective count std::map<std::string, int> stringCount; std::string word, line; int count = 0;//this count the total number of words std::ifstream inputFile("input.txt"); if(inputFile) { while(std::getline(inputFile, line))//go line by line { std::istringstream ss(line); while(ss >> word)//go word by word { //increment the count stringCount[word]++; } } } else { std::cout<<"File cannot be opened"<<std::endl; } inputFile.close(); std::cout<<"Total number of unique words are:"<<stringCount.size()<<std::endl; for(std::pair<std::string, int> pairElement: stringCount) { std::cout<<pairElement.first<<" : "<<pairElement.second<<std::endl; } return 0; }
this is the first line second line is this third line again and again

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue