Click here to Skip to main content
15,888,521 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: database error Pin
David Crow30-Dec-03 2:46
David Crow30-Dec-03 2:46 
Generaldll build problem Pin
will138329-Dec-03 6:00
will138329-Dec-03 6:00 
GeneralRe: dll build problem Pin
Brian Shifrin29-Dec-03 7:19
Brian Shifrin29-Dec-03 7:19 
GeneralMAPI Help Please! Pin
LizardWiz29-Dec-03 5:45
LizardWiz29-Dec-03 5:45 
GeneralRe: MAPI Help Please! Pin
David Crow29-Dec-03 5:58
David Crow29-Dec-03 5:58 
GeneralRe: MAPI Help Please! Pin
LizardWiz29-Dec-03 11:12
LizardWiz29-Dec-03 11:12 
GeneralRe: MAPI Help Please! Pin
Shog929-Dec-03 9:39
sitebuilderShog929-Dec-03 9:39 
GeneralPassing one-dimensional arrays to functions Pin
pf729-Dec-03 4:32
pf729-Dec-03 4:32 
Hi you out there,

I'm a C++ beginner trying to pass one (two) array(s) to a function but
the problem now is that I got different versions of passing such an array
to a function...
Please consider the following example:

I've got a two pre-defined array of let's say six elements:
int MyArray[6];<br />
int MySecondArray[6];


Now I wrote a functions - it even works - that uses the first array to change the second.
It is declared as follows:
void ChangeSecondArray(const int pFirst[], int pSecond[]) // The first array shouldn't be changed, hence I pass it as const (is this right, by the way?)<br />
{<br />
// example follows<br />
if(pFirst[0] == 7)<br />
pSecond[2] = 5;<br />
}


The only thing I want to know is: Does this code only work because I use VC++ 6.0 or is it actually correct the way I've coded it? If not, would one of you please be so kind and tell me how to do it correctly (please remember: I know the size of the array prior to using it within the function, it never changes).

Thanks in advance,
pf7
GeneralRe: Passing one-dimensional arrays to functions Pin
David Crow29-Dec-03 5:10
David Crow29-Dec-03 5:10 
GeneralRe: Passing one-dimensional arrays to functions Pin
pf729-Dec-03 9:50
pf729-Dec-03 9:50 
GeneralRe: Passing one-dimensional arrays to functions Pin
Nitron29-Dec-03 11:10
Nitron29-Dec-03 11:10 
GeneralInterrupt functions Pin
Joe_G29-Dec-03 3:09
Joe_G29-Dec-03 3:09 
GeneralRe: Interrupt functions Pin
David Crow29-Dec-03 3:46
David Crow29-Dec-03 3:46 
GeneralRe: Interrupt functions Pin
Gary R. Wheeler29-Dec-03 11:36
Gary R. Wheeler29-Dec-03 11:36 
QuestionHow to get the user group in win NT/2000/XP Pin
C-lviu29-Dec-03 2:45
C-lviu29-Dec-03 2:45 
AnswerRe: How to get the user group in win NT/2000/XP Pin
David Crow29-Dec-03 3:00
David Crow29-Dec-03 3:00 
GeneralRe: How to get the user group in win NT/2000/XP Pin
C-lviu29-Dec-03 4:11
C-lviu29-Dec-03 4:11 
GeneralRe: How to get the user group in win NT/2000/XP Pin
David Crow29-Dec-03 5:17
David Crow29-Dec-03 5:17 
GeneralRe: How to get the user group in win NT/2000/XP Pin
C-lviu29-Dec-03 5:40
C-lviu29-Dec-03 5:40 
GeneralRe: How to get the user group in win NT/2000/XP Pin
David Crow29-Dec-03 5:54
David Crow29-Dec-03 5:54 
AnswerRe: How to get the user group in win NT/2000/XP Pin
Brian Shifrin29-Dec-03 7:26
Brian Shifrin29-Dec-03 7:26 
QuestionHow could print a line without ending the page? Pin
shooterlily29-Dec-03 2:32
shooterlily29-Dec-03 2:32 
AnswerRe: How could print a line without ending the page? Pin
Roger Allen29-Dec-03 4:48
Roger Allen29-Dec-03 4:48 
GeneralRe: How could print a line without ending the page? Pin
shooterlily29-Dec-03 18:37
shooterlily29-Dec-03 18:37 
AnswerRe: How could print a line without ending the page? Pin
Brian Shifrin29-Dec-03 7:56
Brian Shifrin29-Dec-03 7:56 

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.