Question: the code below retrieve all the data from the url below. But I want to save the results in the output file text. like (info.text), Would you mind help me.

url: <https://www150.statcan.gc.ca/n1/pub/71-607-x/2021004/exp-eng.htm?r1=(1)&r2=0&r3=0&r4=12&r5=0&r7=0&r8=2022-02-01&r9=2022-02-01>

```
from selenium import webdriver
import time

url = "https://www150.statcan.gc.ca/n1/pub/71-607-x/2021004/exp-eng.htm?r1=(1)&r2=0&r3=0&r4=12&r5=0&r7=0&r8=2022-02-01&r9=2022-02-01"

driver = webdriver.Chrome("C:\Program Files\Python310\chromedriver.exe")
driver.get(url)
table = driver.find_element_by_id('report_table')
body = table.find_element_by_tag_name('tbody')
cells = body.find_elements_by_tag_name('td')

for cell in cells:
    print(cell.text)

# run the loop 26 times
for i in range(26):

    # your code
    table = driver.find_element_by_id('report_table')
    body = table.find_element_by_tag_name('tbody')
    cells = body.find_elements_by_tag_name('td')
    for cell in cells:
        print(cell.text)

    # click on the Next button    
    driver.find_element_by_xpath('//*[@id="report_results_next"]').click()

```

Answer: 
You can use [`std::function`](https://en.cppreference.com/w/cpp/utility/functional/function), to store you functions in a container.
Then create an array of `std::function` of size `3`.

```cpp
#include <functional>
#include <iostream>

void triple_balls() { /* YOUR CODE */ }

void longer_paddle() { /* YOUR CODE */ }

void shorter_paddle() { /* YOUR CODE */ }

void bonus_activator(){
    std::function<void(void)> farr[3] = 
    {
        triple_balls,
        longer_paddle,
        shorter_paddle
    };
    farr[rand() % 3]();
}

```
Use a function pointer array instead

```
using BonusFunc = void (*)();
BonusFunc[3] = { triple_balls, longer_paddle, shorter_paddle };

void bonus_activator(){
    BonusFunc[rand() % 3](); // just an example, don't use rand() in real code
}

```