Home > Back-end >  Want to ask, Delphi call C functions
Want to ask, Delphi call C functions

Time:11-07

Want to ask, how call GetLine functions of c + +, Delphi, or with the function that is the same?

CodePudding user response:

ReadLn

CodePudding user response:


I checked the information, like and getline difference a bit big, Readln (F, S) is a line of text reading, there is no sign the end of the string, getline (char * S, streamsize n, char delim) it has, in fact is to see other people using getline () function, use an array to read database way, just want to use it, someone else's program attached, looking for the same function or calls it, would you please help me to consult with the function,
Chjhang:=LineCount (temp)
If temp<& gt;" "Then
Repeat with I:=1 to chjhang
Hangtemp:=GetLine (temp, I)
KSHKH: [I]=GetLine (hangtemp, 3, 3, Tab)
KSHXM: [I]=GetLine (hangtemp, 4, 4, Tab)
KSHXB: [I]=GetLine (hangtemp, 5, 5, Tab)
KSHSHFZH: [I]=GetLine (hangtemp, 6, 6, Tab)
CHJZF: [I]=GetLine (hangtemp, 1, 1, Tab)
Chjhgtemp:=GetLine (hangtemp, 2, 2, and Tab)
If chjhgtemp=0 then
CHJHG: [I]="unqualified"
H:=h + 1
The else
CHJHG: [I]="qualified"
H1: h1=+ 1
End the if
End repeat
End the if

CodePudding user response:

ReadLn in console program, is reading a line, enter the end, read text, you do a capture analysis can not again? Specific see your logic,

CodePudding user response:

Use TStringList, set the LineBreak

CodePudding user response:

@ have a big play nuclear war early, do not know how, can you give an example

CodePudding user response:

This GetLine (hangtemp, 3, 3, and Tab) should be his own, and the cost of c + + : : GetLine parameters are different, you may look for the code
  • Related