Click here to Skip to main content
15,902,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 6:26
Skippums24-Aug-10 6:26 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
norish24-Aug-10 19:30
norish24-Aug-10 19:30 
AnswerRe: Reusing an Incremented Variable within a Single Statement PinPopular
Luc Pattyn24-Aug-10 5:50
sitebuilderLuc Pattyn24-Aug-10 5:50 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 6:15
Skippums24-Aug-10 6:15 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Luc Pattyn24-Aug-10 6:33
sitebuilderLuc Pattyn24-Aug-10 6:33 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 6:54
Skippums24-Aug-10 6:54 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Aescleal24-Aug-10 6:42
Aescleal24-Aug-10 6:42 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 7:06
Skippums24-Aug-10 7:06 
I don't get a list of the type I want back from the API function call... I have to call each API method on a per-element basis. Basically, I have a cell-array from Matlab being passed in:
// prhs is of type "mxArray const *"
size_t const indexCount = mxGetNumberOfElements(prhs[0]);
size_t const dataSize = mxGetNumberOfElements(prhs[1]);
double const ** data = new double const *[dataSize];
// Get the 1-based indices into the data array
unsigned __int32 const *const indices = static_cast<unsigned __int32 const *>(mxGetData(prhs[0]));
for (size_t i = 0; i < dataSize; ++i) {
    // Get a double* to the data in the cell array at 0-indexed location i
    data[i] = mxGetPr(mxGetCell(prhs[1], i));
}
--data; // Make data 1-indexed so I don't have to modify "indices" to be 0-based
That is why I didn't do what you suggested.
Sounds like somebody's got a case of the Mondays

-Jeff

GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Aescleal24-Aug-10 8:23
Aescleal24-Aug-10 8:23 
GeneralRe: Reusing an Incremented Variable within a Single Statement [modified] Pin
Joe Woodbury24-Aug-10 6:52
professionalJoe Woodbury24-Aug-10 6:52 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L24-Aug-10 7:08
Niklas L24-Aug-10 7:08 
GeneralRe: Reusing an Incremented Variable within a Single Statement [modified] Pin
Joe Woodbury24-Aug-10 7:25
professionalJoe Woodbury24-Aug-10 7:25 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L24-Aug-10 7:55
Niklas L24-Aug-10 7:55 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 7:17
Skippums24-Aug-10 7:17 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Joe Woodbury24-Aug-10 7:38
professionalJoe Woodbury24-Aug-10 7:38 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Paul Michalik24-Aug-10 8:00
Paul Michalik24-Aug-10 8:00 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Joe Woodbury24-Aug-10 8:50
professionalJoe Woodbury24-Aug-10 8:50 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Paul Michalik24-Aug-10 21:28
Paul Michalik24-Aug-10 21:28 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Stefan_Lang24-Aug-10 22:02
Stefan_Lang24-Aug-10 22:02 
RantRe: Reusing an Incremented Variable within a Single Statement Pin
JFDR_0225-Aug-10 6:37
JFDR_0225-Aug-10 6:37 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums25-Aug-10 7:04
Skippums25-Aug-10 7:04 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L25-Aug-10 8:02
Niklas L25-Aug-10 8:02 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums25-Aug-10 8:08
Skippums25-Aug-10 8:08 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L25-Aug-10 8:27
Niklas L25-Aug-10 8:27 
Questiondisplaying the layout of an ogg file Pin
rukita24-Aug-10 4:40
rukita24-Aug-10 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.