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#
  4. redirecting output

redirecting output

Scheduled Pinned Locked Moved C#
csharpc++debugginghelpquestion
3 Posts 2 Posters 0 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.
  • T Offline
    T Offline
    theFrenchHornet
    wrote on last edited by
    #1

    I have a solution with C# code in one project calling unmanaged C++, which is in a separate project. The C++ code uses cout <<. These lines of output come to the output window in the debugger. Can I redirect them to a file without changing the code? If so, how? Thanks for any help.

    J 1 Reply Last reply
    0
    • T theFrenchHornet

      I have a solution with C# code in one project calling unmanaged C++, which is in a separate project. The C++ code uses cout <<. These lines of output come to the output window in the debugger. Can I redirect them to a file without changing the code? If so, how? Thanks for any help.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Have you looked at System.Diagnostics.Process class? It has some methods on it for redirecting standard output.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      T 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        Have you looked at System.Diagnostics.Process class? It has some methods on it for redirecting standard output.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        T Offline
        T Offline
        theFrenchHornet
        wrote on last edited by
        #3

        I don't want to change code. I was thinking along the lines of how you would do it if running from a dos prompt/command line: $ aprog.exe > outfile.txt I tried putting " > outfile.txt" on the command parameters line in the debug properties of both projects, but this had no effect.

        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