online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <iostream> std::string MakeStringGreatAgain(std::string s) { std::string str; for(int i=0; i<s.size(); ++i) { if (str.size() && (abs(s[i] - str.back()) == 32)) str.pop_back(); else str.push_back(s[i]); } return str; } int main() { std::cout << "unileEecs: " << MakeStringGreatAgain("unileEecs") << std::endl; std::cout << "unileeecs: " << MakeStringGreatAgain("unileeecs") << std::endl; std::cout << "unilEEEcs: " << MakeStringGreatAgain("unilEEEcs") << std::endl; std::cout << "abBAcC: " << MakeStringGreatAgain("abBAcC") << std::endl; std::cout << "a: " << MakeStringGreatAgain("a") << std::endl; std::cout << ": " << MakeStringGreatAgain("") << std::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