Registered Member
|
Hi
I'm new to eigen, and fairly new to C++. As a result, I've hit a bit of a problem. I want to return a vector from a function, but I'm not really sure if it's even possible. I know that returning an array in C++ is a nasty business, but I wondered if there's a robust solution. My current attempt throws up this error: Unhandled exception at 0x770b15ee (ntdll.dll) in Test project 3.exe: 0xC0000005: Access violation writing location 0x00000000. I have a class called cThinPlateSpline, which has the following method:
I would like to return vflHomologOfPoint, but the above code doesn't work. The main function looks like this:
Any help, or pointers (pun intended), would be much appreciated. Thanks in advance. Liam |
Moderator
|
You probably forgot to resize the vector vflHomologOfPoint. If you try it in "debug" mode, you should get a more explicit error message.
|
Registered Member
|
Thanks! You were right, I'd forgotten to resize the vector.
Liam |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]