|
if(InfoForm->cmbxGoIndexSector->ItemIndex == 0)
{
if(sEthernetRead == "IMOV10")
{
Socket->SendText("OMST010");
}
}
else if(InfoForm->cmbxGoIndexSector->ItemIndex == 1)
{
if(sEthernetRead == "IMOV10")
{
Socket->SendText("OMST020");
}
위의 코드를 아래와 같이 만들고싶습니다.
for(int i=0; i>16; i++)
{
if(InfoForm->cmbxGoIndexSector->ItemIndex == i)
{
if(sEthernetRead == "IMOV10")
{
Socket->SendText("???");
}
}
???문자열 부분에 OMST010에서 "01"부분을 변수로 두어 반복문에 따라 OMST010, OMST020, OMST030으로 증가하며 텍스트를 전송하는 코드를 만들고싶은데 잘 안되네요 ㅠ 고수분들 알려주세요 부탁드릴게요
|