Click here to Skip to main content
15,901,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem Using CString Pin
CoffeeAddict1915-Nov-06 17:31
CoffeeAddict1915-Nov-06 17:31 
AnswerRe: Problem Using CString Pin
Hamid_RT15-Nov-06 18:41
Hamid_RT15-Nov-06 18:41 
QuestionVC++ MFC multi dialog application - crash Pin
sdt2415-Nov-06 6:11
sdt2415-Nov-06 6:11 
AnswerRe: VC++ MFC multi dialog application - crash Pin
Roger Stoltz15-Nov-06 6:30
Roger Stoltz15-Nov-06 6:30 
QuestionRe: VC++ MFC multi dialog application - crash Pin
David Crow15-Nov-06 6:59
David Crow15-Nov-06 6:59 
AnswerRe: VC++ MFC multi dialog application - crash Pin
Raj Prathap15-Nov-06 18:57
Raj Prathap15-Nov-06 18:57 
GeneralRe: VC++ MFC multi dialog application - crash Pin
David Crow16-Nov-06 2:43
David Crow16-Nov-06 2:43 
GeneralRe: VC++ MFC multi dialog application - crash Pin
sdt2416-Nov-06 5:39
sdt2416-Nov-06 5:39 
QuestionRe: VC++ MFC multi dialog application - crash Pin
David Crow16-Nov-06 6:45
David Crow16-Nov-06 6:45 
AnswerRe: VC++ MFC multi dialog application - crash Pin
sdt2420-Nov-06 2:14
sdt2420-Nov-06 2:14 
QuestionodbcDataReader error Pin
priyank_ldce15-Nov-06 6:10
priyank_ldce15-Nov-06 6:10 
AnswerRe: odbcDataReader error Pin
Mark Salsbery15-Nov-06 6:56
Mark Salsbery15-Nov-06 6:56 
QuestionExcel Automation Using C++ #import Pin
Doug Knudson15-Nov-06 5:15
Doug Knudson15-Nov-06 5:15 
AnswerRe: Excel Automation Using C++ #import Pin
Roger Stoltz15-Nov-06 5:47
Roger Stoltz15-Nov-06 5:47 
GeneralRe: Excel Automation Using C++ #import Pin
Doug Knudson15-Nov-06 6:39
Doug Knudson15-Nov-06 6:39 
GeneralRe: Excel Automation Using C++ #import Pin
Roger Stoltz15-Nov-06 6:57
Roger Stoltz15-Nov-06 6:57 
QuestionHow can we get size of the File.... Pin
Anamika200515-Nov-06 5:05
Anamika200515-Nov-06 5:05 
AnswerRe: How can we get size of the File.... Pin
VonHagNDaz15-Nov-06 6:22
VonHagNDaz15-Nov-06 6:22 
GeneralRe: How can we get size of the File.... Pin
Anamika200515-Nov-06 19:51
Anamika200515-Nov-06 19:51 
GeneralRe: How can we get size of the File.... Pin
Anamika200515-Nov-06 19:52
Anamika200515-Nov-06 19:52 
Questionarray of pointers Pin
thathvamsi15-Nov-06 4:46
thathvamsi15-Nov-06 4:46 
Hi all,
thanks all (cedric,toxxct,and brainley) for ur help. This is in response to my post some 5hrs ago.
I do in C. I have corrected the code and i get no warnings now. but i would like to know if the following way of coding and passing the address of the first pointer to funcB is threadsafe in multithreaded environment.
is the follwing way of coding correct?Any help?


funcA{
char * Names[] = {};
int next = 0;
char * list = "Abc";


Names[ next ] = malloc( sizeof( char )*( strlen( list ) + 1 ) );
memcpy( Names[ next ],list,sizeof( char )*( strlen( list ) + 1 ) );

list = "cdefg";
Names[ next+1 ] = malloc( sizeof( char )*( strlen( list ) + 1 ) );
memcpy( Names[ next+1 ],list,sizeof( char )*( strlen( list ) + 1 ) );

printf("vsp list got is %s\n", Names[0] );
printf("vsp list got is %s\n", Names[1] );

funcB(....,...,(const char**)&Names);
}

funcB(...,...,const char ** names)
{
....
//the actual values names[0] and names[1] are to be accessed and used.
...
//free names[0] and names[1]
free( (char*)names[0]);
free( (char*)names[1]);

}

AnswerRe: array of pointers Pin
led mike15-Nov-06 5:17
led mike15-Nov-06 5:17 
GeneralRe: array of pointers Pin
thathvamsi15-Nov-06 14:37
thathvamsi15-Nov-06 14:37 
GeneralRe: array of pointers Pin
led mike16-Nov-06 8:34
led mike16-Nov-06 8:34 
QuestionCOM Dialog Compile Error Pin
jon_fallon15-Nov-06 4:44
jon_fallon15-Nov-06 4:44 

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.