0

I am implementing multilanguage code editor in c#.after typing program in editor when user presses compiler button,c compiler should take program typed(c program) in text area as input & should return its object that will contains corresponding output(output or error if any) .
1) firstly how to call or link c compiler to our c# program?
2)then how to carried out above scenerio?
3) how to catch output given by c compiler?
please suggest solution to above stuff.
with regards,
chetan.

2
Contributors
1
Reply
3
Views
9 Years
Discussion Span
Last Post by dickersonka
0

you can compile c from command line, just use the same from c#
the redirectstandardoutput will allow you to get the output that would be displayed as well

Process proc = new Process();
proc.StartInfo.FileName = "compiler name";
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();

string output = proc.StandardOutput.ReadToEnd();
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.