online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<iostream> #include <string> bool solution(std::string const &str, std::string const &ending) { std::size_t index = str.find(ending); //std::cout<<"index: "<<index<<std::endl; if ( index != std::string::npos && (index == (str.size() - ending.size() ))) { return true; } else { return false; } } int main() { std::string u="He has to give me a new name"; std::string y="name"; std::cout<<std::boolalpha<<solution(u,y); 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