Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Difference in Referencing Elements of CNiMatrix and CNiVector

Primary Software: Measurement Studio>>Visual C++ Support
Primary Software Version: 7.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: I'm accessing my CNiVector elements using Vector[x], but if I try to access my CNiMatrix using Matrix[i,j] or Matrix[i][j], the data is not correct. Are there different syntaxes for each of these classes?

Solution: Yes. The CNiVector should be references using the Vector[x] syntax, but CNiMatrix needs to be referenced using the syntax of Matrix(i,j). The square brackets of the matrix only provide linear indexing via casting to a DataType* and this will not get or set the values correctly.

Related Links: Measurement Studio Support Page

Attachments:





Report Date: 08/07/2005
Last Updated: 09/26/2005
Document ID: 3O6MPO9F

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit