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

 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

 error message:

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

 --- errorlevel 1

 It's a rather basic function call (one which is made quite a few times

 the program), and I'm not quite sure why this instance of it, and only

 instance, keeps coming up with an error message thinking it's trying to

 a structure member (especially considering I haven't used a single

 the program). I have tried changing the name of the function, having it

 pointless integer, but the same error always comes up. The line in

 occurs within a "for" loop inside another function, but this instance

 with an error while the other intance of "wab();" in the function, outside

 "for" loop, goes through the compiler fine. If anyone could give me any

 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

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