Questions and Answers

How do I collect points?

  • +5
    Chosen as best answer
  • +1
    Posted answer
  • +1
    Posted question
  • +1
    Thumb up
  • -1
    Thumb down
1

by Blackn0va in Challenge Help about April 20 open - report

C++ Patching 1 question..

I have 2 or more solution for this "issue" but the KI says "no".

 

Patch 1:

adding the "strcpy_s" Flag -> Code works fine

int main(int argc, char** argv)
{
    if (argc != 2) return 0;
    char Buffer[10];
    memset(Buffer, 0, 10);
    strcpy_s(Buffer, argv[1]);
    printf("%s\n", Buffer);
    return 1;
}

 

Patch 2:

Project Settings, Präprocessor setting add the: "_CRT_SECURE_NO_WARNINGS" Flag -> Code works fine.

 

What do i wrong?

No answers yet. Be the first!
You must login to post an answer.