How to merge the lines into a visual studio on the sie.



  • Why can't you put two lines in one on the visual studio? He's always giving me an exception - Run-Time Check Failure #2 - Stack around the variable 'stroka1' was corrupted.

    #define _CRT_SECURE_NO_DEPRECATE
    #include <stdio.h>
    #include <locale.h>
    #include <string.h>
    int main() {
        setlocale(LC_ALL, "Rus");
        char stroka1[] = "HLT";
        char stroka2[] = "DEF";
        strcat(stroka1, stroka2);
        printf("%s\n", stroka1);
        return 0;
    } 
    


  • I don't know why Visual Studio is.


    ...and the result is recorded in the first line.

    char stroka1[7] = "HLT";
    ...
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2