使用get()并将这些字符附加到字符串是一个废话

时间:2014-11-24 08:05:47

标签: c++ string get

我应该使用一个程序(一次一个char)读取GPS日志文件并解析它。当我使用一些.log文件时,我得到正常的响应,而不是与其他人(特别是不长的)文件。 抓取信息并存储它的代码如下:

class ReadInput{
public:
    string massiveString;
};

void ReadInput::assign(string inMassiveString){ //assign the string passed to it to the object
    this->massiveString.empty();                //clear whatever might be in the string
    this->massiveString=inMassiveString;        //copy the string into where it belongs.
}

int main(int argc, const char * argv[]) {
    ifstream inputStream;
    inputStream.open("gps3.log");
    int i = 1;
    char temp;
    string tempString;
    ReadInput *sentence[258];

    //this is the part that grabs the characters
    while(1){ //
        if (!inputStream.eof()){ //
            inputStream.get(temp);
            if (temp!=' ') {
                tempString.append(&temp);                  //this appends the characters to a temporary string
                // cout << i << "\t" << tempString << endl; //testing the input 
            }
            if (temp == '\n') {             //if this is the end of the line, pass it on.
                sentence[i]=new ReadInput;  
                sentence[i]->assign(tempString);  //the part that copies the temporary string to the object
                cout << i << "\t" << sentence[i]->massiveString << endl; //another testing line 
                i++;
                tempString.clear();
            }
        }
        else{
            break;
        }
    }
}

我逐字逐句地阅读它是非常重要的。 应该阅读的内容如下所示: $ GPGGA,155008.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,男,-33.6,男,, 0000 * 53 这是一个有问题的阅读的例子。格式为 entry#,stringStoredInEntry。

1   $GPGGA,155002.000,3732.7239,N,07726.9956,W,1,05,1.7,89.1,M,-33.6,M,,0000*58
2   $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
3   $GPRMC,155002.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*48
4   $GPGGA,155003.000,3732.7239,N,07726.9956,W,1,05,1.7,89.1,M,-33.6,M,,0000*59
5   $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
6   $GPGSV,3,1,12,17,64,038,42,06,63,250,43,28,44,150,45,02,25,239,38*7B
7   $GPGSV,3,2,12,24,17,294,22,10,21,176,22,12,25,316,23,51,36,223,37*71
8   F
9   $   G   P   R   M   C   ,   1   5   5   0   0   3   .   0   0   0   ,   A   ,   3   79
    10  $
G
P
G
G
A
,
1
5
5
0
0
4
.
0
0
0
,
3
7
3
2
.
7
2
3
9
,
N
,
0
7
7
2
6
.
9
9
5
6
,
W
,
1
,
0
5
,
1
.
7
,
8
9
.
1
,
M
,
-
3
3
.
6
,
M
,
,
0
0
0
0
*
5
E



11  $
         G
          P
           G
            S
             A
              ,
               A
                ,
                 3
                  ,
                   1
                    7
                     ,
                      0
                       6
                        ,
                         2
                          8
                           ,
                            0
                             2
                              ,
                               2
                                4
                                 ,
                                  ,
                                   ,
                                    ,
                                     ,
                                      ,
                                       ,
                                        ,
                                         3
                                          .
                                           2
                                            ,
                                             1
                                              .
                                               7
                                                ,
                                                 2
                                                  .
                                                   7
                                                    *
                                                     3
                                                      E



12  $
         G
          P
           R
            M
             C
              ,
               1
                5
                 5
                  0
                   0
                    4
                     .
                      0
                       0
                        0
                         ,
                          A
                           ,
                            3
                             7
                              3
                               2
                                .
                                 7
                                  2
                                   3
                                    9
                                     ,
                                      N
                                       ,
                                        0
                                         7
                                          7
                                           2
                                            6
                                             .
                                              9
8       $GPGGA,155009.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*52
29      $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
30      $GPRMC,155009.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*43
31      $GPGGA,155010.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*5A
 2      $ G P G S A , A , 3 , 1 7 , 0 6 , 2 8 , 0 2 , 2 4 , , , , , , , , 3 . 2 , 1 . 7 , 2 . 7 * 3 E 
!33     $!G!P!R!M!C!,!1!5!5!0!1!0!.!0!0!0!,!A!,!3!7!3!2!.!7!2!3!9!,!N!,!0!7!7!2!6!.!9!9!5!6!,!W!,!0!.!0!0!,!8!0!.!3!0!,!1!4!1!0!1!4!,!,!,!A!*!4!B!
"34     $"G"P"G"G"A","1"5"5"0"1"1"."0"0"0","3"7"3"2"."7"2"3"9","N","0"7"7"2"6"."9"9"5"6","W","1","0"5","1"."7","8"9"."0","M","-"3"3"."6","M",","0"0"0"0"*"5"B"
#35     $#G#P#G#S#A#,#A#,#3#,#1#7#,#0#6#,#2#8#,#0#2#,#2#4#,#,#,#,#,#,#,#,#3#.#2#,#1#.#7#,#2#.#7#*#3#E#
$36     $$G$P$R$M$C$,$1$5$5$0$1$1$.$0$0$0$,$A$,$3$7$3$2$.$7$2$3$9$,$N$,$0$7$7$2$6$.$9$9$5$6$,$W$,$0$.$0$0$,$8$0$.$3$0$,$1$4$1$0$1$4$,$,$,$A$*$4$A$
%37     $%G%P%G%G%A%,%1%5%5%0%1%2%.%0%0%0%,%3%7%3%2%.%7%2%3%9%,%N%,%0%7%7%2%6%.%9%9%5%6%,%W%,%1%,%0%5%,%1%.%7%,%8%9%.%0%,%M%,%-%3%3%.%6%,%M%,%,%0%0%0%0%*%5%8%
&38     $&G&P&G&S&A&,&A&,&3&,&1&7&,&0&6&,&2&8&,&0&2&,&2&4&,&,&,&,&,&,&,&,&3&.&2&,&1&.&7&,&2&.&7&*&3&E&
'39     $'G'P'R'M'C','1'5'5'0'1'2'.'0'0'0','A','3'7'3'2'.'7'2'3'9','N','0'7'7'2'6'.'9'9'5'6','W','0'.'0'0','8'0'.'3'0','1'4'1'0'1'4',',','A'*'4'9'
(40     $(G(P(G(G(A(,(1(5(5(0(1(3(.(0(0(0(,(3(7(3(2(.(7(2(3(9(,(N(,(0(7(7(2(6(.(9(9(5(6(,(W(,(1(,(0(5(,(1(.(7(,(8(9(.(0(,(M(,(-(3(3(.(6(,(M(,(,(0(0(0(0(*(5(9(
)41     $)G)P)G)S)A),)A),)3),)1)7),)0)6),)2)8),)0)2),)2)4),),),),),),),),)3).)2),)1).)7),)2).)7)*)3)E)
*42     $*G*P*G*S*V*,*3*,*1*,*1*2*,*1*7*,*6*4*,*0*3*8*,*4*1*,*0*6*,*6*3*,*2*5*0*,*4*2*,*2*8*,*4*4*,*1*5*0*,*4*3*,*0*2*,*2*5*,*2*3*9*,*3*8***7*F*
+43     $+G+P+G+S+V+,+3+,+2+,+1+2+,+2+4+,+1+7+,+2+9+4+,+2+3+,+1+0+,+2+1+,+1+7+6+,+2+2+,+1+2+,+2+5+,+3+1+6+,+2+4+,+5+1+,+3+6+,+2+2+3+,+3+5+*+7+5+
,44     $,G,P,G,S,V,,,3,,,3,,,1,2,,,2,0,,,3,4,,,0,6,2,,,,,0,1,,,0,7,,,0,5,1,,,,,0,4,,,0,6,,,0,5,2,,,,,3,2,,,0,2,,,0,3,3,,,*,7,F,
-45     $-G-P-R-M-C-,-1-5-5-0-1-3-.-0-0-0-,-A-,-3-7-3-2-.-7-2-3-9-,-N-,-0-7-7-2-6-.-9-9-5-6-,-W-,-0-.-0-0-,-8-0-.-3-0-,-1-4-1-0-1-4-,-,-,-A-*-4-8-
.46     $.G.P.G.G.A.,.1.5.5.0.1.4...0.0.0.,.3.7.3.2...7.2.3.9.,.N.,.0.7.7.2.6...9.9.5.6.,.W.,.1.,.0.5.,.1...7.,.8.9...0.,.M.,.-.3.3...6.,.M.,.,.0.0.0.0.*.5.E.
/47     $/G/P/G/S/A/,/A/,/3/,/1/7/,/0/6/,/2/8/,/0/2/,/2/4/,/,/,/,/,/,/,/,/3/./2/,/1/./7/,/2/./7/*/3/E/
048     $0G0P0R0M0C0,0105050001040.0000000,0A0,030703020.070203090,0N0,00070702060.090905060,0W0,000.00000,08000.03000,0104010001040,0,0,0A0*040F0
149     $1G1P1G1G1A1,1115151011151.1010101,131713121.171213191,1N1,10171712161.191915161,1W1,111,10151,111.171,18191.101,1M1,1-13131.161,1M1,1,101010101*151F1
250     $2G2P2G2S2A2,2A2,232,21272,20262,22282,20222,22242,2,2,2,2,2,2,2,232.222,212.272,222.272*232E2
351     $3G3P3R3M3C3,3135353031353.3030303,3A3,333733323.373233393,3N3,30373732363.393935363,3W3,303.30303,38303.33303,3134313031343,3,3,3A3*343E3
452     $4G4P4G4G4A4,4145454041464.4040404,434743424.474243494,4N4,40474742464.494945464,4W4,414,40454,414.474,48484.494,4M4,4-43434.464,4M4,4,404040404*45444
553     $5G5P5G5S5A5,5A5,535,51575,50565,52585,50525,52545,5,5,5,5,5,5,5,535.525,515.575,525.575*535E5
654     $6G6P6R6M6C6,6165656061666.6060606,6A6,636763626.676263696,6N6,60676762666.696965666,6W6,606.60606,68606.63606,6164616061646,6,6,6A6*646D6
755     $7G7P7G7G7A7,7175757071777.7070707,737773727.777273797,7N7,70777772767.797975767,7W7,717,70757,717.777,78787.797,7M7,7-73737.767,7M7,7,707070707*75757
856     $8G8P8G8S8A8,8A8,838,81878,80868,82888,80828,82848,8,8,8,8,8,8,8,838.828,818.878,828.878*838E8
957     $9G9P9R9M9C9,9195959091979.9090909,9A9,939793929.979293999,9N9,90979792969.999995969,9W9,909.90909,98909.93909,9194919091949,9,9,9A9*949C9
:58 $:G:P:G:G:A:,:1:5:5:0:1:8:.:0:0:0:,:3:7:3:2:.:7:2:3:9:,:N:,:0:7:7:2:6:.:9:9:5:6:,:W:,:1:,:0:5:,:1:.:7:,:8:8:.:9:,:M:,:-:3:3:.:6:,:M:,:,:0:0:0:0:*:5:A:
;59 $;G;P;G;S;A;,;A;,;3;,;1;7;,;0;6;,;2;8;,;0;2;,;2;4;,;,;,;,;,;,;,;,;3;.;2;,;1;.;7;,;2;.;7;*;3;E;
<60 $<G<P<G<S<V<,<3<,<1<,<1<2<,<1<7<,<6<4<,<0<3<9<,<4<2<,<0<6<,<6<4<,<2<5<0<,<4<3<,<2<8<,<4<3<,<1<5<1<,<4<2<,<0<2<,<2<5<,<2<3<9<,<3<8<*<7<C<
=61     $=G=P=G=S=V=,=3=,=2=,=1=2=,=2=4=,=1=7=,=2=9=4=,=1=3=,=1=0=,=2=1=,=1=7=6=,=2=2=,=1=2=,=2=5=,=3=1=6=,=2=6=,=5=1=,=3=6=,=2=2=3=,=3=6=*=7=7=
>62     $>G>P>G>S>V>,>3>,>3>,>1>2>,>2>0>,>3>4>,>0>6>1>,>,>0>1>,>0>7>,>0>5>1>,>,>0>4>,>0>5>,>0>5>2>,>,>3>2>,>0>2>,>0>3>2>,>*>7>E>
?63     $?G?P?R?M?C?,?1?5?5?0?1?8?.?0?0?0?,?A?,?3?7?3?2?.?7?2?3?9?,?N?,?0?7?7?2?6?.?9?9?5?6?,?W?,?0?.?0?0?,?8?0?.?3?0?,?1?4?1?0?1?4?,?,?,?A?*?4?3?
@64     $@G@P@G@G@A@,@1@5@5@0@1@9@.@0@0@0@,@3@7@3@2@.@7@2@3@9@,@N@,@0@7@7@2@6@.@9@9@5@6@,@W@,@1@,@0@4@,@2@.@3@,@8@8@.@9@,@M@,@-@3@3@.@6@,@M@,@,@0@0@0@0@*@5@D@
A65     $AGAPAGASAAA,AAA,A3A,A1A7A,A0A6A,A2A8A,A0A2A,A,A,A,A,A,A,A,A,A4A.A8A,A2A.A3A,A4A.A3A*A3A0A
B66     $BGBPBRBMBCB,B1B5B5B0B1B9B.B0B0B0B,BAB,B3B7B3B2B.B7B2B3B9B,BNB,B0B7B7B2B6B.B9B9B5B6B,BWB,B0B.B0B0B,B8B0B.B3B0B,B1B4B1B0B1B4B,B,B,BAB*B4B2B
B67     $GPGGA,155007.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*5C
C1  $GPGGA,155002.000,3732.7239,N,07726.9956,W,1,05,1.7,89.1,M,-33.6,M,,0000*58
21  $GPRMC,155007.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*4D
22  $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E,1.7,89.0,M,-33.6,M,,0000*53
23  $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E
34  $GPRMC,155002.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*48
25  $GPGSV,3,2,12,24,17,294,22,10,21,176,22,12,25,316,24,51,36,223,35*74
46  $GPGGA,155003.000,3732.7239,N,07726.9956,W,1,05,1.7,89.1,M,-33.6,M,,0000*59
27  $
5   $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E

6   $GPGSV,3,1,12,17,64,038,42,06,63,250,43,28,44,150,45,02,25,239,38*7B

7   $GPGSV,3,2,12,24,17,294,22,10,21,176,22,12,25,316,23,51,36,223,37*71

8   F

9   $   G   P   R   M   C   ,   1   5   5   0   0   3   .   0   0   0   ,   A   ,   3   79

10  $
G
P
G
G
A
,
1
5
5
0
0
4
.
0
0
0
,
3
7
3
2
.
7
2
3
9
,
N
,
0
7
7
2
6
.
9
9
5
6
,
W
,
1
,
0
5
,
1
.
7
,
8
9
.
1
,
M
,
-
3
3
.
6
,
M
,
,
0
0
0
0
*
5
E




11  $
         G
          P
           G
            S
             A
              ,
               A
                ,
                 3
                  ,
                   1
                    7
                     ,
                      0
                       6
                        ,
                         2
                          8
                           ,
                            0
                             2
                              ,
                               2
                                4
                                 ,
                                  ,
                                   ,
                                    ,
                                     ,
                                      ,
                                       ,
                                        ,
                                         3
                                          .
                                           2
                                            ,
                                             1
                                              .
                                               7
                                                ,
                                                 2
                                                  .
                                                   7
                                                    *
                                                     3
                                                      E




12  $
         G
          P
           R
            M
             C
              ,
               1
                5
                 5
                  0
                   0
                    4
                     .
                      0
                       0
                        0
                         ,
                          A
                           ,
                            3
                             7
                              3
                               2
                                .
                                 7
                                  2
                                   3
                                    9
                                     ,
                                      N
                                       ,
                                        0
                                         7
                                          7
                                           2
                                            6
                                             .
                                              9
                                               9
                                                5
                                                 6
                                                  ,
                                                   W
                                                    ,
                                                     0
                                                      .
                                                       0
                                                        0
                                                         ,
                                                          8
                                                           0
                                                            .
                                                             3
                                                              0
8       $GPGGA,155009.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*52
                                                                1
29      $GPGSA,A,3,17,06,28,02,24,,,,,,,,3.2,1.7,2.7*3E          4
                                                                  1
30      $GPRMC,155009.000,A,3732.7239,N,07726.9956,W,0.00,80.30,141014,,,A*43
                                                                    1
31      $GPGGA,155010.000,3732.7239,N,07726.9956,W,1,05,1.7,89.0,M,-33.6,M,,0000*5A
                                                                      ,
 2      $ G P G S A , A , 3 , 1 7 , 0 6 , 2 8 , 0 2 , 2 4 , , , , , , , , 3 . 2 , 1 . 7 , 2 . 7 * 3 E 
                                                                        ,
!3      $!G!P!R!M!C!,!1!5!5!0!1!0!.!0!0!0!,!A!,!3!7!3!2!.!7!2!3!9!,!N!,!0!7!7!2!6!.!9!9!5!6!,!W!,!0!.!0!0!,!8!0!.!3!0!,!1!4!1!0!1!4!,!,!,!A!*!4!B!
!                                                                         *
"4      $"G"P"G"G"A","1"5"5"0"1"1"."0"0"0","3"7"3"2"."7"2"3"9","N","0"7"7"2"6"."9"9"5"6","W","1","0"5","1"."7","8"9"."0","M","-"3"3"."6","M",","0"0"0"0"*"5"B"
"                                                                           E
#5  $#G#P#G#S#A#,#A#,#3#,#1#7#,#0#6#,#2#8#,#0#2#,#2#4#,#,#,#,#,#,#,#,#3#.#2#,#1#.#7#,#2#.#7#*#3#E#
#
$6  $$G$P$R$M$C$,$1$5$5$0$1$1$.$0$0$0$,$A$,$3$7$3$2$.$7$2$3$9$,$N$,$0$7$7$2$6$.$9$9$5$6$,$W$,$0$.$0$0$,$8$0$.$3$0$,$1$4$1$0$1$4$,$,$,$A$*$4$A$
$
%7  $%G%P%G%G%A%,%1%5%5%0%1%2%.%0%0%0%,%3%7%3%2%.%7%2%3%9%,%N%,%0%7%7%2%6%.%9%9%5%6%,%W%,%1%,%0%5%,%1%.%7%,%8%9%.%0%,%M%,%-%3%3%.%6%,%M%,%,%0%0%0%0%*%5%8%
%
&8  $&G&P&G&S&A&,&A&,&3&,&1&7&,&0&6&,&2&8&,&0&2&,&2&4&,&,&,&,&,&,&,&,&3&.&2&,&1&.&7&,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.8.9...0.,.M.,.-.3.3...6.,.M.,.,.0.0.0.0.*.5.E.
.
/7  $/G/P/G/S/A/,/A/,/3/,/1/7/,/0/6/,/2/8/,/0/2/,/2/4/,/,/,/,/,/,/,/,/3/./2/,/1/./7/,/2/./7/*/3/E/
/
08  $0G0P0R0M0C0,0105050001040.0000000,0A0,030703020.070203090,0N0,00070702060.090905060,0W0,000.00000,08000.03000,0104010001040,0,0,0A0*040F0
0
19  $1G1P1G1G1A1,1115151011151.1010101,131713121.171213191,1N1,10171712161.191915161,1W1,111,10151,111.171,18191.101,1M1,1-13131.161,1M1,1,101010101*151F1
1
20  $2G2P2G2S2A2,2A2,232,21272,20262,22282,20222,22242,2,2,2,2,2,2,2,232.222,212.272,222.272*232E2
2
31  $3G3P3R3M3C3,3135353031353.3030303,3A3,333733323.373233393,3N3,30373732363.393935363,3W3,303.30303,38303.33303,3134313031343,3,3,3A3*343E3
3
42  $4G4P4G4G4A4,4145454041464.4040404,434743424.474243494,4N4,40474742464.494945464,4W4,414,40454,414.474,48484.494,4M4,4-43434.464,4M4,4,404040404*45444
4
53  $5G5P5G5S5A5,5A5,535,51575,50565,52585,50525,52545,5,5,5,5,5,5,5,535.525,515.575,525.575*535E5
5
64  $6G6P6R6M6C6,6165656061666.6060606,6A6,636763626.676263696,6N6,60676762666.696965666,6W6,606.60606,68606.63606,6164616061646,6,6,6A6*646D6
6
75  $7G7P7G7G7A7,7175757071777.7070707,737773727.777273797,7N7,70777772767.797975767,7W7,717,70757,717.777,78787.797,7M7,7-73737.767,7M7,7,707070707*75757
7
86  $8G8P8G8S8A8,8A8,838,81878,80868,82888,80828,82848,8,8,8,8,8,8,8,838.828,818.878,828.878*838E8
8
97  $9G9P9R9M9C9,9195959091979.9090909,9A9,939793929.979293999,9N9,90979792969.999995969,9W9,909.90909,98909.93909,9194919091949,9,9,9A9*949C9
9
:8  $:G:P:G:G:A:,:1:5:5:0:1:8:.:0:0:0:,:3:7:3:2:.:7:2:3:9:,:N:,:0:7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.B0B0B0B,BAB,B3B7B3B2B.B7B2B3B9B,BNB,B0B7B7B2B6B.B9B9B5B6B,BWB,B0B.B0B0B,B8B0B.B3B0B,B1B4B1B0B1B4B,B,B,BAB*B4B2B
B
1-7是完美的。大。 然后8变怪了。 它永远不会正常。 这是从哪里来的?这是.log文件的问题吗?这是我的代码吗?这个废话在哪里蔓延?更重要的是,它如何搞乱左边的整数?如何能够始终如一地制作一个无意义的整数?

1 个答案:

答案 0 :(得分:0)

使用tempString.push_back(temp); 而不是tempString.append(&amp; temp); 修复一切。