Dynamic aspect to string in C++

Hi Guys,

Im an automation engineer, first time attempt at a C++ app. Im writing an app that connects with manufacturing software, reads tag data from a PLC, calls a com object, and writes results of com interaction back to the PLC.

I have one problem which is bugging me. The setup I have is I specify the PLC "Tag Name" to a .dll and it reads/writes to the tag.

There are multiple groups of tags ie

"tag_instance[1].some_info_a"
"tag_instance[1].some_info_b"
"tag_instance[2].some_info_a"
"tag_instance[2].some_info_b"

etc etc

So my question is this: how do I place a variable pointer within the strings above so that I end up with something like this:
where n is the pointer:

"tag_instance[n].some_info_a"

Thanks for the help in advance
Topic archived. No new replies allowed.