online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<algorithm> #include<string> #include<vector> void print_vectorStr(const std::vector<std::string> &vec, std::string sep = "") { std::cout << "\nThe vector string elements are: "; for (auto elem : vec) { std::cout << elem << sep; } std::cout << std::endl; } int main() { int n; std::cout << "insert n \n"; std::cin >> n; std::vector<std::string> vecString; for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { vecString.push_back(std::to_string(i)); //add element into the vecString } } print_vectorStr(vecString, " ");//prints the required pattern }

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