C++Builder 6 如何写配置文件连接数据库。配置文件写好(库名,用户名,密码) 然后project中一个下拉框
选择我填入了其中一个库名字,再点按钮成功显示连接成功,失败显示连接失败!,有没有哪个C++大神可以告之一下,万分感谢...
选择我填入了其中一个库名字,再点按钮 成功显示连接成功,失败显示连接失败!,有没有哪个C++大神可以告之一下,万分感谢
展开
2016-07-21
展开全部
Private Sub Command1_Click()
Dim i, j, a(), b, c, m, x, y fileno = FreeFile Open App.Path & "\in.txt" For Input As #fileno Input #fileno, b Input #fileno, c Do While Not EOF(fileno) ReDim Preserve a(0 To b - 1, 0 To c - 1) For j = 0 To c - 1 Input #fileno, a(i, j) If m < a(i, j) Then m = a(i, j) x = i + 1 y = j + 1 End If Next j i = i + 1 Loop Close fileno Open App.Path & "\out.txt" For Output As #fileno Print #fileno, x; Print #fileno, y Close filenoEnd Sub
Dim i, j, a(), b, c, m, x, y fileno = FreeFile Open App.Path & "\in.txt" For Input As #fileno Input #fileno, b Input #fileno, c Do While Not EOF(fileno) ReDim Preserve a(0 To b - 1, 0 To c - 1) For j = 0 To c - 1 Input #fileno, a(i, j) If m < a(i, j) Then m = a(i, j) x = i + 1 y = j + 1 End If Next j i = i + 1 Loop Close fileno Open App.Path & "\out.txt" For Output As #fileno Print #fileno, x; Print #fileno, y Close filenoEnd Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询