online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <fstream> int main() { std::fstream F; F.open("text.txt", std::ios::in); if(!F.is_open()) std::cout << "Ошибка открытия файла" << std::endl; else{ char beg = 'p'; std::string temp; int n=0; while(std::getline(F, temp)) { if (temp.front() == beg) n++; } std::cout << n << " строк начинается на букву 'p'" << std::endl; } F.close(); return 0; }
op pi vc za pr gl vo kr le po

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