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#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <iostream> #include <string> using namespace std; string NhapChuoi(); void InDaoNguoc(string s); //Chỉ cần in đảo ngược string DaoNguoc(string s); //Trả về chuổi đảo ngược int DemTu(string s); //Trả về số lượng từ trong chuỗi string XoaTrang(string s); //Trả về chuổi không còn khoảng trắng int main() { string s = "tran huy l ong"; string s2; cout<<XoaTrang(s); return 0; } string NhapChuoi(){ string s; getline(cin,s); return s; } void InDaoNguoc(string s){ for(int i=s.length(); i>=0; i--){ cout<<s[i]; } } string DaoNguoc(string s){ string rs; int i=s.length(); while(i--){ rs.push_back(s[i]); } return rs; } int DemTu(string s){ int c = (s[0] != ' '); for(int i=0; i<s.length()-1; i++){ if(s[i] == ' ' && s[i+1] != ' '){ c++; } } return c; } string XoaTrang(string s){ string rs; for(int i=0; i<s.length(); i++){ if(s[i] != ' ') rs.push_back(s[i]); } return rs; }

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