| | |
non-lvalue in assignment
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
I have a matrix class which there are matrix objects. I want to call .value(int,int) directly on the matrix objects and set the internal 2d vector to the value on the right side of the equal sign.
Here is what I want to do:
[code]
new_matrix.value(row,col) = 0;
[code]
Here is what I've tried:
Where mat is the internal 2d vector data.
Here is what I want to do:
[code]
new_matrix.value(row,col) = 0;
[code]
Here is what I've tried:
C Syntax (Toggle Plain Text)
int &Matrix::value(int row, int col) { return this->mat[row][col]; }
Where mat is the internal 2d vector data.
![]() |
Similar Threads
- Help needed with VB Assignment (Visual Basic 4 / 5 / 6)
- Many Errors while doing this assignment (C)
- I need help on my 'address book' assignment! (C++)
- C++ Syntax (C++)
Other Threads in the C Forum
- Previous Thread: modular programming
- Next Thread: How to concatenate two values in an char array
| Thread Tools | Search this Thread |
adobe api array arrays bash binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators initialization intmain() iso km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue multi mysql oddnumber odf open opendocumentformat opensource openwebfoundation pattern pdf performance pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition scanf scheduling scripting segmentationfault send shape socketprograming socketprogramming stack standard strchr string strings suggestions test testautomation unix urboc user variable voidmain() win32api windows.h






