Were you wanting to use std::string member functions? If so, there's one called find_last_of() that returns an index into the string of the last character or string that you send it:
string str("\\ddata\\conf\\src\\bin\\d_5032.dat"),title;
string::size_type idxslash,idxdot...
How about:
==============================================
function output=recursive_function(parameters)
global idx;
if (isempty(idx)), idx=1;
else, idx=idx+1;
end
if (condition_is_met)
recursive_function(parameters)
end
output=whatever...
Couldn't the "parent" give the "child" its index? For example, the following case for calculating a factorial recursively:
===============================================
function out=fact(N,pid)
if (~exist('pid','var')) %first one
if (~exist('N','var'))...
A constructor is a function that:
*Has no return value
*Is implicitly called when an object of that particular class is created
It is generally good practice to have a destructor, even if you don't do anything in it.
A destructor is necessary if you have any memory in the object that needs...
Anyone know where I can find info on the format of object files (particularly MSVC++ Debug & Release, as well as gcc)? I would like to develop a program that would output the function hierarchy given the .obj files in the project.
Do you want a_ptr & b_ptr to be matrices? Use the command:
a_ptr=mxCreateDoubleMatrix(nrows,ncols,MX_REAL);
Then you'll need to retreive a pointer to the mxArray to populate it with values (ap=mxGetPr(a_ptr)). The array is 1-D, so you can set index (2,3) to 1.1 with the command...