online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <sstream> #include <fstream> int main() { std::ifstream inputFile("input.txt"); std::string word1,word2,word3,word4,word5; float price;//price take from user std::cin >> price; float priceFile; //price read from file if(inputFile) { while(std::getline(inputFile, word1,','),//read the first word std::getline(inputFile, word2,','),//read the second word std::getline(inputFile, word3,','),//read the third word std::getline(inputFile, word4,','),//read the fourth word std::getline(inputFile, word5,'\n'))//note the '\n' this time { std::istringstream ss(word5); ss >> priceFile; //check if(priceFile <= price) { std::cout<<word1 <<" "<<word2<<" "<<word3<<" "<<word4<<" "<<word5<<std::endl; } } } else { std::cout<<"Input file cannot be openede"<<std::endl; } }
Riga,Kraslava,Pr,15:00,11.00 Riga ,Kraslava,Pr ,18:00,11.00 Kraslava,Riga,Pr,08:00,11.00 Kraslava,Daugavpils,Ot ,10:00, 3.00 Rezekne,Riga,Tr,13:00,10.50 Dagda,Kraslava, Ce,18:00, 2.50 Riga,Ventspils, Pt,09:00 , 6.70 Liepaja,Ventspils,Pt,17:00,5.50

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