online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <string> int main() { std::cout << "Enter a line of text: " << std::endl; std::string inputLine; std::getline(std::cin, inputLine);//take input from user and put it into inputLine std::string var = "1234567890123456789012345678901234567890"; //-----------------------------------------------vvvvv----------->use size member function of std::string std::cout << "Length of string is: " << inputLine.size() << std::endl; if (inputLine.size() > var.size()) { std::cout << "Error, your line must be less than 40 characters" << std::endl; } else { std::cout<<"valid input"<<std::endl; } }

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