online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> #include <fstream> using namespace std; int main() { fstream plik; plik.open ("palindromy.txt", ios::in); if (plik.good () == true) { while (!plik.eof ()) { string linia; getline (plik, linia); auto j=linia.rbegin (); size_t i =0; size_t ile = (linia.size () / 2.0 + 0.5); for ( ;i<ile; i++, j++) { if (linia[i]!=*j) break; } if(ile==i) cout<<"Jest palidomem\n"; else cout<<"Nie jest palidomen\n"; }plik.close(); } std::cout<<std::endl; }
abccba abcdcba abcdefcba

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