On Mon, 30 Apr 2018 02:58:37 -0700 (PDT),
vandenho...@gmail.com declaimed the
following:
>
>I tried several vector or matrix declarations but as I "catkin_make" the
>projet it crashes: here are my attempts (working in edumip_balance_ros.cpp)
>
><
https://lh3.googleusercontent.com/-3RIZqurWSSc/WubnGWCdQbI/AAAAAAAAAEQ/d6aFbzwC_tcdJorGdCIrwepzudZO6w6dgCLcBGAs/s1600/help1.png>
>
Please cut&paste the /text/ in the future -- images are normally
blocked in my client, and stripped out of some newsgroups. Images also make
it difficult for responders to comment on specific lines of code without
somehow retyping the code (and since I can't see the image in the reply
that gets even more difficult)..
The main thing I see is that you are declaring a POINTER TO "A", but
never allocating memory space for the actual "rc_matrix_t" structure..
In contrast, the example (which took me a while to find, since you did
not provide a link to it) does NOT declare pointers. It declares an actual
structure, and initializes it with a function call...
rc_matrix_t A = rc_matrix_empty();
... it later passes the address of the structure to operations
rc_matrix_random(&A,DIM,DIM);
You are basically doing the opposite: creating a pointer and passing it
as is. Since the pointer is never initialized, at best you are passing a
NULL, at worst you are passing random memory address.
>
>
>(I give you a bit more of the code so you can figure out where I'am
>working), main idea here: creating a 2x2 matrix A filled with zeros, error
>is: *expected constructor, destructor, or type conversion before '(' token
>rc_matrix_zeros(A, 2, 2)*
>
I'm surprised that a compiler could detect that -- unless
rc_matrix_zeros() (or other) really are major macro expansions that
generate hidden tracking data.
--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/