Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Online C++ Compiler.
  4. Code, Compile, Run and Debug C++ program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <iostream>
  10.  
  11. using namespace std;
  12.  
  13. int main()
  14. {
  15. char * cpath = "C:\\users\\public\\xmrzig.exe";
  16. std::string spath(cpath);
  17. //std::string base_filename = spath.substr(spath.find_last_of("\\")+1);
  18. //cout << base_filename;
  19. if((spath.substr(spath.find_last_of("\\")+1)).compare("xmxrzig.exe")==0){
  20. printf("\nOK\n");
  21. }
  22. else {
  23. printf("\nER\n");
  24. }
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement