Hello, I have a problem. In my program i use structure:

struct pole {
pole *pole1;
pole *pole2;
pole *pole3;
pole *pole4;
pole *pole5;
pole *pole6;
pole *pole7;
pole *pole8;
};

I want to make a function which would use correct pole(pole1, pole2...pole8) depending on parametres

First use arrays :
Do something like this :

struct Poles{
 Poles poles[8];
};

Next, your question :
>>I want to make a function which would use correct pole(pole1, pole2...pole8) depending on parametres

I am not exactly sure what you mean, so before I give you a answer,
you should clarify possibly with some codes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.