online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std; bool teksty_sa_identyczne(string t1, string t2) { int dl1 = t1.length(), dl2 = t2.length(); int i = 0; while (i < dl1 && i < dl2 && t1[i] == t2[i]) i++; return i == dl1 && i == dl2; } int main() { string tekst1 = "Lorem ipsum dolor sit amet.", tekst2 = "Excepteur sint occaecat non proident."; cout << "Tekst:\n" << "1. " << tekst1 << "\n" << "2. " << tekst2 << "\n" << "sa " << ((teksty_sa_identyczne(tekst1, tekst2)) ? "identyczne" : "rozne") << "\n\n"; cout << "Tekst:\n" << "1. " << tekst1 << "\n" << "2. " << tekst1 << "\n" << "sa " << ((teksty_sa_identyczne(tekst1, tekst1)) ? "identyczne" : "rozne") << endl; return 0; }

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