Click here to Skip to main content
15,921,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can a CAB get parameter from html ? Pin
suninwater29-Oct-03 16:21
suninwater29-Oct-03 16:21 
GeneralRe: Class Constructor Help Pin
Andrew Walker29-Oct-03 16:49
Andrew Walker29-Oct-03 16:49 
GeneralChanging CListBox sort at runtime Pin
Daniel132429-Oct-03 15:39
Daniel132429-Oct-03 15:39 
GeneralRe: Changing CListBox sort at runtime Pin
vcplusplus29-Oct-03 15:45
vcplusplus29-Oct-03 15:45 
GeneralRe: Changing CListBox sort at runtime Pin
Daniel132429-Oct-03 16:02
Daniel132429-Oct-03 16:02 
GeneralRe: Changing CListBox sort at runtime Pin
vcplusplus29-Oct-03 16:11
vcplusplus29-Oct-03 16:11 
Generalarray of Strings Pin
convert_sg29-Oct-03 15:14
convert_sg29-Oct-03 15:14 
GeneralRe: array of Strings Pin
Navin29-Oct-03 15:30
Navin29-Oct-03 15:30 
In reality, when talking about function parameters, these are the same:
<br />
void Func1(char *target[size]);<br />
void Func2(char *target[]);<br />
void Func3(char **target);<br />


A string is a pointer to a character. So an array of strings would be a pointer to strings, or a pointer to a pointer to a character. Here's a quickie example. Note that when passing in array pointers to functions, you need to pass in the size of that array. (Yet another reason to use classes..)
void Func(char **strings, int size)
{
  for(int i = 0; i < size; i++)
  {
     cout << "String " << i << " is: " << strings[i] << endl;
  }
}


You might allocate such an array like this:
int size = 10;
char **stringArray = new char * [size];
for(int i = 0; i < size; i++)
{
  stringArray[i] = strdup("Chimpanzee");
}


Since I just hacked this out right now, without a compiler, fixing any bugs is left as an exercise to the reader. Big Grin | :-D




If your nose runs and your feet smell, then you're built upside down.
GeneralRe: array of Strings Pin
convert_sg29-Oct-03 15:48
convert_sg29-Oct-03 15:48 
GeneralRe: array of Strings Pin
vcplusplus29-Oct-03 15:39
vcplusplus29-Oct-03 15:39 
GeneralRe: array of Strings Pin
Christian Graus29-Oct-03 15:48
protectorChristian Graus29-Oct-03 15:48 
GeneralChange font size for CComboBox and CEdit Pin
srev29-Oct-03 14:14
srev29-Oct-03 14:14 
GeneralRe: Change font size for CComboBox and CEdit Pin
Yonatan26-Nov-03 2:04
Yonatan26-Nov-03 2:04 
Generalsimple console input question Pin
rajdawg29-Oct-03 14:09
rajdawg29-Oct-03 14:09 
GeneralRe: simple console input question Pin
Christian Graus29-Oct-03 15:23
protectorChristian Graus29-Oct-03 15:23 
GeneralRe: simple console input question Pin
Christian Graus29-Oct-03 15:47
protectorChristian Graus29-Oct-03 15:47 
GeneralRe: simple console input question Pin
rajdawg30-Oct-03 1:08
rajdawg30-Oct-03 1:08 
GeneralLayered Service Provider (LSP) Pin
catmust29-Oct-03 13:55
catmust29-Oct-03 13:55 
GeneralRe: Layered Service Provider (LSP) Pin
Alexander M.,30-Oct-03 2:49
Alexander M.,30-Oct-03 2:49 
GeneralRe: Layered Service Provider (LSP) Pin
catmust30-Oct-03 8:55
catmust30-Oct-03 8:55 
GeneralLoading dll issue during debuging Pin
catmust29-Oct-03 13:48
catmust29-Oct-03 13:48 
Generalmemory allocation issues Pin
Steven M Hunt29-Oct-03 13:21
Steven M Hunt29-Oct-03 13:21 
GeneralRe: memory allocation issues Pin
Christian Graus29-Oct-03 15:52
protectorChristian Graus29-Oct-03 15:52 
Generalsockets and threads Pin
michael_cowan29-Oct-03 13:14
michael_cowan29-Oct-03 13:14 
GeneralWINS Pin
Jair29-Oct-03 13:06
Jair29-Oct-03 13:06 

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.