Advertisement
CybEl

StackBufferOverflow

Sep 15th, 2020
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <iostream>
  4. //Configuration Properties >> C / C++ >> Preporocessor >> Preprocessor Definitions >> _CRT_SECURE_NO_WARNINGS
  5.  
  6. int main()
  7. {
  8. char buff[15];
  9. std::cout << "Enter the password: ";
  10. std::cin >> buff;
  11.  
  12. if (strcmp(buff, "password12"))
  13. {
  14. std::cout << "Incorrect password";
  15. }
  16. else
  17. {
  18. std::cout << "Correct password";
  19.  
  20. }
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement