CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2019
    Posts
    56

    [RESOLVED] Can I automatically add some code to the start of all functions?

    For example, I want to add the code below automatically to all functions without scrolling down and pasting it manually to every function in VS 2017. Is there any lifehack for it?

    HTML Code:
    void function(void)
    {
        _tcscpy(myExecutableExe, sysDrive);
        _tcscat(myExecutableExe, _T("\\Executable.exe"));
        _tcscpy(myExecutableExe0, sysDrive);
        _tcscat(myExecutableExe0, _T("\\Executable0.exe"));
    Last edited by prako2; August 28th, 2019 at 09:54 AM.

  2. #2
    Join Date
    Aug 2019
    Posts
    56

    Re: Can I automatically add some code to the start of all functions?

    I found a way: const string s3 = sysDrive + ""s + "\\Executable.exe"; at global scope.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured