我有这样的输入文件:
The Branch PC is e05f56f8
The Branch Type is branch_type_1
The Branch is Taken
The Branch Target is e045ac20
jal__ 1141512
The Branch PC is e045ac44
The Branch Type is branch_type_1
The Branch is Taken
The Branch Target is e05f57d4
jal__ 1562101
The Branch PC is e05f57fc
The Branch Type is branch_type_1
The Branch is Taken
The Branch Target is e05f578c
jal__ 1562083
我需要从“”行获取分支PC的信息,以及从“ The Branch PC is ********
”行获取分支是否被Taken for Not Taken The Branch is Taken/Not Taken
。并将这两个信息存储到所有分支的二维数组中。
我想知道使用后fopen
,如何检查每一行以获得我想要的信息。