www.digitalmars.com         C & C++   DMDScript  

c++ - Problem compiling

reply Owen Rooney <Owen_member pathlink.com> writes:
I first apologise for what will almost certainly be a simple error on my part
caused by my very limited experience of C++ programming. Anyway, I've been
trying to compile a fairly simple program, and cannot get my way around this
error message:

wab();
^
test012.cpp(859) : Error: ';' expected following declaration of struct member
--- errorlevel 1

It's a rather basic function call (one which is made quite a few times through
the program), and I'm not quite sure why this instance of it, and only this
instance, keeps coming up with an error message thinking it's trying to declare
a structure member (especially considering I haven't used a single structure in
the program). I have tried changing the name of the function, having it input a
pointless integer, but the same error always comes up. The line in question
occurs within a "for" loop inside another function, but this instance comes up
with an error while the other intance of "wab();" in the function, outside the
"for" loop, goes through the compiler fine. If anyone could give me any help in
the matter it would be greatly appreciated.
Apr 12 2003
next sibling parent Richard Grant <fractal clark.net> writes:
In article <b7a3m4$kun$1 digitaldaemon.com>, Owen Rooney says...

wab();
^
test012.cpp(859) : Error: ';' expected following declaration of struct member
--- errorlevel 1
Function call is probably fine, look above the function for a syntax error. Richard
Apr 12 2003
prev sibling parent reply "Matthew Wilson" <dmd synesis.com.au> writes:
Post the full file, and we'll take a look

"Owen Rooney" <Owen_member pathlink.com> wrote in message
news:b7a3m4$kun$1 digitaldaemon.com...
 I first apologise for what will almost certainly be a simple error on my
part
 caused by my very limited experience of C++ programming. Anyway, I've been
 trying to compile a fairly simple program, and cannot get my way around
this
 error message:

 wab();
 ^
 test012.cpp(859) : Error: ';' expected following declaration of struct
member
 --- errorlevel 1

 It's a rather basic function call (one which is made quite a few times
through
 the program), and I'm not quite sure why this instance of it, and only
this
 instance, keeps coming up with an error message thinking it's trying to
declare
 a structure member (especially considering I haven't used a single
structure in
 the program). I have tried changing the name of the function, having it
input a
 pointless integer, but the same error always comes up. The line in
question
 occurs within a "for" loop inside another function, but this instance
comes up
 with an error while the other intance of "wab();" in the function, outside
the
 "for" loop, goes through the compiler fine. If anyone could give me any
help in
 the matter it would be greatly appreciated.
Apr 12 2003
parent reply Owen Rooney <Owen_member pathlink.com> writes:
Here it is, if anyone wishes to give any advice

In article <b7a6l0$muf$1 digitaldaemon.com>, Matthew Wilson says...

Post the full file, and we'll take a look
begin 0644 test012.cpp M,2QX,BQX,RQX-"QX-2QX-BQY,2QY,BQY,RQY-"QY-2QY-BQH:6=H+&QO=RQA M*'9O:60I"0D)"0D)+R]3971S(&%A(&%N9"!A8B!A8V-O<F1I;F< =&\ =PT* M86$]=SL-" D)86(],#L-" T*"7T-" T*"65L<V4 :68H=ST]-2D)"0D)"2\O M4V5T=&EN9R!A82!A;F0 86( =&\ 9VEV92!T=V\ 9&ER96-T:6]N<R!F;W( M86(]-#L-" T*"7T-" T*"65L<V4 :68H=ST]."D-" T*"7L-" T*"0EA83TT M:6UE*"9S96-O;F1S*3L-" D)<W)A;F0H*'5N<VEG;F5D(&EN="D <V5C;VYD M<3L-" EI;G0 <CL-" T*"79O:60 9')A=RAI;G0 92QI;G0 9BD-" T*"7L- M" T*"0ET:6TH*3L-" T*"0EL;W<]93L)"0D)"2\O0W)E871I;F< <F]O;0T* M?'PH8FQO8EMX,BLQ75MY,2TQ73T],2E\?"AB;&]B6W Q+3%=6WDR*S%=/3TQ M,2TQ73T],2E\?"AB;&]B6VUI9"AX,2QX,BE=6WDR*S%=/3TQ*7Q\*&)L;V); M73T],2E\?"AB;&]B6W Q75MY,5T]/3$I*3L-" T*"0EF;W(H>3UY,3L >3P] M>3([('DK*RD)"0DO+T9I;&QI;F< <F]O;0T*"0T*"2` "7L-" D-" D ("` M"0EF;W(H>#UX,3L >#P M(&9I*0D)"0DO+T9I;&QS(')O;VT <F\ =VET:"!N=6UB97( 9FD-" T*>PT* M/69I<G-T+GDQ.PT*"0EY,CUF:7)S="YY,CL-" T*"7T-" T*"65L<V4 :68H M=2QI;G0 =BD)"0D)"2\O1VEV97, 9&ER96-T:6]N(&]F(')O;VT =B!F<F]M M"7 T/69O=7)T:"YX,CL-" D)>3,]9F]U<G1H+GDQ.PT*"0EY-#UF;W5R=& N M"7DV/7-E8V]N9"YY,CL-" T*"7T-" T*"65L<V4 :68H=CT],RD-" T*"7L- M+GDQ.PT*"0EY-CUT:&ER9"YY,CL-" T*"7T-" T*"65L<V4 :68H=CT]-"D- M-#X M-28F>30^/7DV)B9X,SYX-BD)"0DO+TEF(&QE9G0-" T*"7L-" T*"0ER971U M<FX -#L- M(&EF*' T/' V)B9Y-#QY-BD M"0D)+R])9B!D;W=N+6QE9G0-" T*"7L-" T*"0ER971U<FX -SL-" T*"7T- M"7L-" T*"0ER971U<FX .#L- M"FEN="!D:7)P<BAI;G0 >"QI;G0 >2QI;G0 =BD)"0D)+R]':79E<R!D:7)E M)G U/' I"0D)"2\O268 =7`-" T*"7L-" T*"0ER971U<FX ,3L-" T*"7T- M971U<FX ,#L- M9BAL/BAT:&ER9"YX,2TQ*28F;#PH M,2TQ*28F;#PH9F]U<G1H+G R*S$I)B9M/BAF;W5R=& N>3$M,2DF)FT\*&9O M" ER971U<FX ,#L- M86,H*2D)"2\O4F5P96%T:6YG('5N=&EL(&YO(&-O;&QI<VEO;B!D971E8W1E M*28F8FQO8EMX75MY+3)=/3TH,'Q\,BDF)F)L;V);>"LQ75MY+3)=/3TH,'Q\ M,BDF)F)L;V);>"TQ75MY+3%=/3TH,'Q\,BDF)F)L;V);>"LQ75MY+3%=/3TH M;&]B6WA=6WDK,ET]/2 P?'PR*28F8FQO8EMX*S%=6WDK,ET]/2 P?'PR*28F M8FQO8EMX+3%=6WDK,5T]/2 P?'PR*28F8FQO8EMX*S%=6WDK,5T]/2 P?'PR M*28F(2AY*S$]/3$Y*2D)"2\O0V]N=&EN=6EN9R!P87-S86=E(&1O=VX-" D- M" D)"7L-" D-" D)"0EY/7DK,3L-" T*"0D)"6)L;V);>%U;>5T],3L-" T* M" D)"7L-" T*"0D)"6HK*SL)"0D)+R]0<F5V96YT:6]N(&9O<B!G971T:6YG M" T*"7H],#L-" T*"60],#L- M("`)9F]R*' ],#L >#PR,#L >"LK*0D)"0DO+T9I;&QI;F< :6UA9V4 =VET M"7L-" T*("` (`D)9F]R*' ],#L >#PR,#L >"LK*0T*"0T*("` (`D)>PT* F"7T-" T*"6-I;CX^>#L- ` end
Apr 13 2003
parent reply "Matthew Wilson" <matthew stlsoft.org> writes:
On line 857, you have the expression


  w=dirpr(x,y,p)


This needs a terminating semi-colon, as in

  w=dirpr(x,y,p);


This now compiles. (I've not run it)



"Owen Rooney" <Owen_member pathlink.com> wrote in message
news:b7cq8j$29g5$1 digitaldaemon.com...
 Here it is, if anyone wishes to give any advice

In article <b7a6l0$muf$1 digitaldaemon.com>, Matthew Wilson says...

Post the full file, and we'll take a look
Apr 13 2003
parent Owen Rooney <Owen_member pathlink.com> writes:
Thanks, I can't believe I missed the semicolon, it was right there staring me in
the face. Anyway, thanks for the help.

In article <b7cti0$2bjf$1 digitaldaemon.com>, Matthew Wilson says...
On line 857, you have the expression


  w=dirpr(x,y,p)


This needs a terminating semi-colon, as in

  w=dirpr(x,y,p);


This now compiles. (I've not run it)



"Owen Rooney" <Owen_member pathlink.com> wrote in message
news:b7cq8j$29g5$1 digitaldaemon.com...
 Here it is, if anyone wishes to give any advice

In article <b7a6l0$muf$1 digitaldaemon.com>, Matthew Wilson says...

Post the full file, and we'll take a look
Apr 14 2003