View Full Version : C++ Urgent Help Needed : WTF is this error


Zero
05-31-03, 08:27 PM
My compiler won't build this big project I made, and gives me

cposition.cpp:42: passing `const position' as `this' argument of `int position::ncols()' discards qualifiers

My project includes 5 classes, and one driver cpp program.


At first glance, can anyone tell me what is wrong and how I fix it? This is driving me nuts.

CuriousGene
05-31-03, 08:55 PM
Christ sake . . . is this for your homework?

Zero
05-31-03, 09:05 PM
Look, I am getting extremely frustrated. This is worth my entire quarter grade (like 70%) and I have 3 days to fix it. I can't even get it to build because of this stupid error I have no clue to fix. Right now, I hate my life, I hate the assignment, I hate this stupid compiler I have to work with, I hate myself, I hate being alive in general, and I want to die.

PLEASE, post SUGGESTIONS or ADVICE or SOMETHING USEFUL.

AntonK
06-01-03, 02:07 AM
We need more source code...i have an idea of what might be wrong..but i need to see the source files...post them somewhere on the web and give us the link.

-AntonK

thefountainhed
06-01-03, 07:13 PM
I suppose u are using Visual C++. Make sure you are using the Cposition class correctly (http://www.cs.okstate.edu/cs3373/programs/pgm02.html). But as previously suggeted, u should post source code.