ojosVerdes
Technical User
Hi all,
I program using vb and I would like to convert the followig code to C or C++. I need to develop a small program that can run from the command line; I am having trouble converting the following code to C/C++
Can someone please help me.
Thanks
//bToCheck is a boolean.
//strReadIn is a string variable that holds up 200
//characters
//strBatch is a 25 string variable.
If Not bToCheck Then
If Mid(strReadIn, 155, 1) = "H" Then
strBatch = Mid(strReadIn, 155, 16)
intBL = 16
ElseIf Mid(strReadIn, 155, 3) = "SME" Then
strBatch = Mid(strReadIn, 155, 19)
intBL = 19
ElseIf Mid(strReadIn, 155, 3) = "DSI" Then
strBatch = Mid(strReadIn, 155, 19)
intBL = 19
ElseIf Mid(strReadIn, 155, 5) = "00000" Then
strBatch = Mid(strReadIn, 175, 25)
intBL = 25
End If
lngNofBatches = lngNofBatches + 1
bToCheck = True
End If
I program using vb and I would like to convert the followig code to C or C++. I need to develop a small program that can run from the command line; I am having trouble converting the following code to C/C++
Can someone please help me.
Thanks
//bToCheck is a boolean.
//strReadIn is a string variable that holds up 200
//characters
//strBatch is a 25 string variable.
If Not bToCheck Then
If Mid(strReadIn, 155, 1) = "H" Then
strBatch = Mid(strReadIn, 155, 16)
intBL = 16
ElseIf Mid(strReadIn, 155, 3) = "SME" Then
strBatch = Mid(strReadIn, 155, 19)
intBL = 19
ElseIf Mid(strReadIn, 155, 3) = "DSI" Then
strBatch = Mid(strReadIn, 155, 19)
intBL = 19
ElseIf Mid(strReadIn, 155, 5) = "00000" Then
strBatch = Mid(strReadIn, 175, 25)
intBL = 25
End If
lngNofBatches = lngNofBatches + 1
bToCheck = True
End If