<p>I want to do something very simple in C++ but i can't find how.
I want to create a function like a for loop where i will ideally enter a variable for the times the iteration should happen and some functions inside brackets my function will execute. I hope i was clear enough. Thanks...</p>

<p>Example</p>

<pre><code>superFor (1)
{
  //commands to be executed here  
  add(1+2);
}
</code></pre>

```
```
void DoSomethingRepeatedly(int numTimesTo Loop)
{
   for(int i=0; i<numTimesToLoop; i++)
   { 
       //do whatever; 
   }
}
```
```
That it ? That can't be.. too simple.. I must be misunderstanding your question :(
Of course you'd have to check that the value of numTimesToLoop is >= 0.
Edit: I made it a method, just in case.