online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/*************************************************************** * Name: Rafael Orta * Course: Computer Science & Programming * Class: CS04103 Section: 4 & 5 * Assignment Date: 03/07/25 * File Name: Extractor.cpp ***************************************************************** * ID: Not Applicable * Purpose: Collects the full ame and returns only the last name *****************************************************************/ #include <iostream> #include <string> using namespace std; string extract (string); int main() { // Variable Declaration string fullName; // Collecting Data cout << "Enter your full name: "; getline(cin,fullName); // Calling the function and returning values to the screen cout << endl << "The last name is: " << extract(fullName) << endl; return 0; } // Function Definition string extract (string fullName) { int pos = 0, size = 0; size = fullName.length(); pos = fullName.find(' '); return fullName.substr(pos+1,size); }

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