CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Jun 2015
    Posts
    21

    How to find all assignments the values to variables,by '=' or by func or as ref value

    How to find where a variable takes value (preferably c++ source and grep,awk&sed and regex tools, variable is Integer,char* and string can get value by =, or arbitrary function without =)

    -We're dealing with a great deal of code and watch- in debugger- can be done but in many cases it is time consuming and ineffective.
    for direct assignments we can write:

    $grep -nE '^\s*i\s*=' directory_of_code | grep -v '=='
    Last edited by alwaystudent; August 9th, 2019 at 06:48 AM. Reason: misspelling

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