Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to call a function inside another function in file like utility.c

how to call a function inside another function in file like utility.c

Scheduled Pinned Locked Moved C / C++ / MFC
toolstutorial
6 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mybm1
    wrote on last edited by
    #1

    Quote:

    how to call a function inside another function in file like utility.c

    L W Richard Andrew x64R 3 Replies Last reply
    0
    • M mybm1

      Quote:

      how to call a function inside another function in file like utility.c

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      That question is impossible to answer. Please give some proper detailed context about your problem. Calling a function is just the same wherever you call it from.

      M 1 Reply Last reply
      0
      • L Lost User

        That question is impossible to answer. Please give some proper detailed context about your problem. Calling a function is just the same wherever you call it from.

        M Offline
        M Offline
        mybm1
        wrote on last edited by
        #3

        utility.c file consist of following function:

        function list_file_directory() // function 1
        {
        //listing wave file from directory;
        }
        function wavread() // function 2

        {
        // reading the .wav file;
        }
        function noise
        {
        //here i want to call the both above function and perform futher calculation //is it possible?
        }

        main.c
        {
        call function 1
        {display}
        call function 2
        {
        display
        }
        }

        L 1 Reply Last reply
        0
        • M mybm1

          utility.c file consist of following function:

          function list_file_directory() // function 1
          {
          //listing wave file from directory;
          }
          function wavread() // function 2

          {
          // reading the .wav file;
          }
          function noise
          {
          //here i want to call the both above function and perform futher calculation //is it possible?
          }

          main.c
          {
          call function 1
          {display}
          call function 2
          {
          display
          }
          }

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          maibam debina wrote:

          i want to call the both above function and perform futher calculation //is it possible?

          Of course it is; just call them. What is your problem with this?

          1 Reply Last reply
          0
          • M mybm1

            Quote:

            how to call a function inside another function in file like utility.c

            W Offline
            W Offline
            WuRunZhe
            wrote on last edited by
            #5

            It can not be understood. Could you tell more detail? :)

            1 Reply Last reply
            0
            • M mybm1

              Quote:

              how to call a function inside another function in file like utility.c

              Richard Andrew x64R Offline
              Richard Andrew x64R Offline
              Richard Andrew x64
              wrote on last edited by
              #6

              In C, you cannot define a function inside another function. All functions must stand on their own.

              The difficult we do right away... ...the impossible takes slightly longer.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups