0

I need to modify an object in a QVector. I'm the [] operator to point to the object, which is overloaded with a constant and a non-constant version. The problem I'm having is that I don't know how to specify the non-const version, so I get compile errors telling me that it couldn't convert a constant to a non-constant object.

2
Contributors
2
Replies
14
Views
4 Years
Discussion Span
Last Post by James19142
0

I found out what was wrong, the problem wasn't the overloaded funtion, the error was reffering to converting pointer types, so the error looked similar to this: couldn't convert object of type const *T to type T ", and by not looking closely, I mislead myself. I was having the problem for some days and I just couldn't find it until after posting. My bad for posting a void thread.

Edited by James19142

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.