Skip to main content
gamedev.net
🔒 Locked

non-class type ERROR

Started by kelaklub 4 replies 550+ views
Original Post
kelaklub
kelaklub
I have been working on a geometric library in an attempt to improve my C++ skills, and so far I have learned alot. However I have no idea on how to resolve the following error that I have been getting. It says the setStartPoint() function is not a part of my clLineSegment_3d class, but that's not true. // ****************************************** main.cpp:477: error: request for member setStartPoint' in lineSegA_3d', which is of non-class type `nmEzGeom::clLineSegment_3d<double> ()()' // ****************************************** The library can be downloaded from here. You can either open the project with Code::Blocks by clicking on the .CBP file, or just run "g++ main.cpp". Or use whatever compiler you have. Thanks for you time.
ToohrVyk
ToohrVyk
It says that lineSegA_3d is not of a class type. Please provide the definition of this variable (because it might be using a non-class type), as well as the definition of its type (because it might not be a class type), omitting irrelevant members.
Enigma
Enigma
clLineSegment_3d < double > lineSegA_3d(); does not define a variable of type clLineSegment_3d < double >, it declares a function named lineSegA_3d which takes no parameters and returns a clLineSegment_3d < double >. Remove the parenthesis.

Σnigma
kelaklub
kelaklub
lineSegA_3d is an object of my clLineSegment_3d class.
ToohrVyk
ToohrVyk
Quote:
Original post by kelaklub
lineSegA_3d is an object of my clLineSegment_3d class.


This is what you think it is, but the compiler disagrees, and I'd think he's right. You probably have a small mistake in your code, such as the one outlined by Enigma.

So, please provide the actual code that defines it.
kelaklub
kelaklub
"Remove the parenthesis."

Oh jeez, I can't believe I missed that. Oh man, sorry to bother you guys. What a way to start the new year. ARRRRRGGHHHH.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.