Click here to Skip to main content
14,661,504 members
Home » Discussions » Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: using 'mkdir' for creating new directory Pin
Wes Aday3-Aug-15 9:26
professionalWes Aday3-Aug-15 9:26 
Questionadding pointer arrays Pin
Member 935023729-Jul-15 22:09
MemberMember 935023729-Jul-15 22:09 
AnswerRe: adding pointer arrays Pin
Richard Andrew x6430-Jul-15 9:29
professionalRichard Andrew x6430-Jul-15 9:29 
AnswerRe: adding pointer arrays Pin
Richard MacCutchan30-Jul-15 21:26
mveRichard MacCutchan30-Jul-15 21:26 
GeneralRe: adding pointer arrays Pin
Member 935023730-Jul-15 21:51
MemberMember 935023730-Jul-15 21:51 
GeneralRe: adding pointer arrays Pin
Richard MacCutchan30-Jul-15 22:16
mveRichard MacCutchan30-Jul-15 22:16 
GeneralRe: adding pointer arrays Pin
Member 935023730-Jul-15 23:16
MemberMember 935023730-Jul-15 23:16 
GeneralRe: adding pointer arrays Pin
Richard MacCutchan30-Jul-15 23:42
mveRichard MacCutchan30-Jul-15 23:42 
I would do something like:
bool* pBool = boolArray + 10;     // skip first 10 elements
srand( (unsigned)time( NULL ) );  // set a random seed for the generator
for (int i = 0; i < 10; ++i)      // loop round each set of 12 elements, i.e. 10 times
{
    memset(pBool, 1, sizeof(bool) * 12); // set all 12 elements to 1s
    int rIndex = rand() % 12;            // get index in range [0 .. 11]
    pBool[rIndex] = 0;                   // set this one to zero
    do
    {
        int rIndex2 = rand() % 12; // get index in range [0 .. 11]
        pBool[rIndex2] = 0;        // set this one to zero
    } while (rIndex2 == rIndex);   // make sure they are different elements

    pBool += 12;                   // point to the next set, and repeat
}

I have not tested this so you need to try it a few times to make sure it produces the desired results.
GeneralRe: adding pointer arrays Pin
Member 935023731-Jul-15 0:34
MemberMember 935023731-Jul-15 0:34 
GeneralRe: adding pointer arrays Pin
Richard MacCutchan31-Jul-15 0:36
mveRichard MacCutchan31-Jul-15 0:36 
QuestionDeclaration terminated incorrectly Pin
Pramitha P Kamath27-Jul-15 8:35
MemberPramitha P Kamath27-Jul-15 8:35 
AnswerRe: Declaration terminated incorrectly Pin
Wes Aday27-Jul-15 8:59
professionalWes Aday27-Jul-15 8:59 
GeneralRe: Declaration terminated incorrectly Pin
Pramitha P Kamath30-Jul-15 8:46
MemberPramitha P Kamath30-Jul-15 8:46 
AnswerRe: Declaration terminated incorrectly Pin
Richard MacCutchan30-Jul-15 21:14
mveRichard MacCutchan30-Jul-15 21:14 
Questionc++ Pin
Member 1184600721-Jul-15 21:43
MemberMember 1184600721-Jul-15 21:43 
AnswerRe: c++ Pin
Richard MacCutchan21-Jul-15 21:53
mveRichard MacCutchan21-Jul-15 21:53 
GeneralRe: c++ Pin
Sascha Lefèvre25-Jul-15 12:39
professionalSascha Lefèvre25-Jul-15 12:39 
QuestionRe: c++ Pin
Paul Conrad13-Oct-15 7:20
professionalPaul Conrad13-Oct-15 7:20 
Questionc++ Pin
Member 1184600721-Jul-15 21:19
MemberMember 1184600721-Jul-15 21:19 
GeneralRe: c++ Pin
Richard MacCutchan21-Jul-15 21:54
mveRichard MacCutchan21-Jul-15 21:54 
AnswerRe: c++ Pin
den2k8821-Jul-15 22:02
professionalden2k8821-Jul-15 22:02 
RantRe: c++ Pin
Richard Deeming22-Jul-15 1:22
mveRichard Deeming22-Jul-15 1:22 
QuestionAdd a dll file to using VC++ and use its functions Pin
ktnk19-Jul-15 3:03
Memberktnk19-Jul-15 3:03 
AnswerRe: Add a dll file to using VC++ and use its functions Pin
Richard Andrew x6419-Jul-15 6:00
professionalRichard Andrew x6419-Jul-15 6:00 
Questionc++ Pin
Member 1184600718-Jul-15 1:47
MemberMember 1184600718-Jul-15 1:47 

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.