online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <vector> #include <algorithm> int main() { int n; std::cout <<"Enter n:"<<std::endl; std::cin >> n; std::vector<int> arr(n); //create a vector of size n instead of an array std::cout<<"Enter elements: "<<std::endl; //iterate and take input from user for(int &elem: arr){ std::cin >> elem ; } int x; std::cout << "Enter x: "<<std::endl; std::cin>>x; //use std::partition std::stable_partition(arr.begin(), arr.end(), [x](int i){return (i < x);}); std::cout<<"This is the partitioned vector: "<<std::endl; for(int i=0;i<n;i++) { std::cout<<arr[i]<<"\t"; } 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