Click here to Skip to main content
15,917,174 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get button in MSN when create a ATL-COM application. Pin
Prakash Nadar24-Mar-04 15:20
Prakash Nadar24-Mar-04 15:20 
GeneralRe: How to get button in MSN when create a ATL-COM application. Pin
Pankaj Bhalla25-Mar-04 11:22
Pankaj Bhalla25-Mar-04 11:22 
GeneralRe: How to get button in MSN when create a ATL-COM application. Pin
Prakash Nadar25-Mar-04 14:33
Prakash Nadar25-Mar-04 14:33 
Generalstring arrays in c++ Pin
mrspam24-Mar-04 10:55
mrspam24-Mar-04 10:55 
GeneralRe: string arrays in c++ Pin
antlers24-Mar-04 11:19
antlers24-Mar-04 11:19 
GeneralRe: string arrays in c++ Pin
BlackDice24-Mar-04 11:21
BlackDice24-Mar-04 11:21 
GeneralRe: string arrays in c++ Pin
mrspam24-Mar-04 12:13
mrspam24-Mar-04 12:13 
GeneralRe: string arrays in c++ Pin
Curi0us_George24-Mar-04 19:03
Curi0us_George24-Mar-04 19:03 
You must pass the array size to myfunc. Myfunc receives a string pointer (that's all an array really is, a pointer to a contiguous block of strings), and has no way of knowing the size of the array that pointer points to.

Inside the main function, the compiler substitutes the sizeof operator for the actual known size of your string array. However, inside the myfunc function, the compiler has no way to determine the size of the array passed. If you print the sizeof(mystring) in myfunc, you'll find it always equals 4, the size in bytes of a pointer (on the x86 architecture).

It would probably be better if sizeof() never worked on arrays at all. At least then it would be consistent and less likely to confuse people who've never run into this before.
GeneralRe: string arrays in c++ Pin
Paul Ranson25-Mar-04 1:53
Paul Ranson25-Mar-04 1:53 
GeneralCalling DLL from Delphi Pin
BlackDice24-Mar-04 10:51
BlackDice24-Mar-04 10:51 
GeneralRe: Calling DLL from Delphi Pin
Snyp24-Mar-04 14:11
Snyp24-Mar-04 14:11 
GeneralRe: Calling DLL from Delphi Pin
Prakash Nadar24-Mar-04 15:16
Prakash Nadar24-Mar-04 15:16 
Generalerror LNK2001 with static and global data in a Win32 C++ Dll Pin
Hashim Saleem24-Mar-04 10:49
Hashim Saleem24-Mar-04 10:49 
GeneralRe: error LNK2001 with static and global data in a Win32 C++ Dll Pin
BlackDice24-Mar-04 10:55
BlackDice24-Mar-04 10:55 
GeneralRe: error LNK2001 with static and global data in a Win32 C++ Dll Pin
Hashim Saleem24-Mar-04 11:02
Hashim Saleem24-Mar-04 11:02 
GeneralRe: error LNK2001 with static and global data in a Win32 C++ Dll Pin
BlackDice24-Mar-04 11:18
BlackDice24-Mar-04 11:18 
GeneralInvoking Outlook Exp. from VC++ Application. Pin
Pankaj Bhalla24-Mar-04 10:46
Pankaj Bhalla24-Mar-04 10:46 
Generallarge font vs. small font woes ... Pin
Maximilien24-Mar-04 10:15
Maximilien24-Mar-04 10:15 
GeneralRe: large font vs. small font woes ... Pin
Todd Smith25-Mar-04 13:28
Todd Smith25-Mar-04 13:28 
Questiondoc/view app with treeview on the left, how? Pin
lordgreg24-Mar-04 9:57
lordgreg24-Mar-04 9:57 
AnswerRe: doc/view app with treeview on the left, how? Pin
Prakash Nadar24-Mar-04 15:13
Prakash Nadar24-Mar-04 15:13 
GeneralRe: doc/view app with treeview on the left, how? Pin
axid3j1al24-Mar-04 19:24
axid3j1al24-Mar-04 19:24 
GeneralRe: doc/view app with treeview on the left, how? Pin
Prakash Nadar24-Mar-04 19:50
Prakash Nadar24-Mar-04 19:50 
GeneralRe: doc/view app with treeview on the left, how? Pin
axid3j1al24-Mar-04 20:11
axid3j1al24-Mar-04 20:11 
GeneralRe: doc/view app with treeview on the left, how? Pin
Prakash Nadar24-Mar-04 21:44
Prakash Nadar24-Mar-04 21: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.