Help regarding function returning string
Hi there!
I am working on a C program that calls into a C++ program. the C++ program computes a string and returns it to the C program. There is something wrong with this, even though i get no errors or warnings. i would appriciate if someone could guide me over this. I am sure my EXTERN "C" works fine, because i tried returning a string "THIS WORKS" and it did. Also the conversions/other functions are working fine! The only thing i want to be sure of is that will my program print a string BUF or not! Then i can move further figuring out what's wrong!
The code is:
//******** C *********************************
printdate(bst_v4date, date_buffer)
//**********C PLUS PLUS************************
char * printdate(const sys_date& Date , char *Buf){
CV_CONTROL cv_blk;
CV_DATE_FMT dfmt = cdf_ascii;
ba_setup(&cv_blk, NULL, NULL);
ba_idat(&cv_blk, 15, 1, bs(cdo_set) | bs(cdo_full_yr), &dfmt);
ba_buffer(&cv_blk, Buf, 0);
ba_dat(&cv_blk, &Date, 0, 0);
ba_char(&cv_blk, '\0');
return Buf;
}
Thanks!

