473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

to get the output of c in a text file?

thanks for replying my previous question..........

it worked and nw to get the print of the file that had run successfully what should i do..........

my friends suggested me to using prnt screen and den paste in paint...........

but i couldn get dat,,,,,i wanna get output printd ........
pls do help me

thanks in advance.............:)
Mar 5 '10 #1
1 1860
Banfa
9,065 Expert Mod 8TB
If it is a windows program then using <PrintScreen> or <Alt>-<PrintScreen> (to capture the focused window only) is your best bet.

If it is a console program and you are outputing using printf or a similar function then you have a couple of options.

Programatically you could add lines of code that close the current stdout and open a file in place of it.

A little more simply you can use the pipe capabilities of the command line. Assuming that you program is call test.exe and you want the results in results.txt then either
text.exe > results.txt
or
text.exe >> results.txt
The first line deletes the current contents of results.txt, the second method appends the output of the program to the current contents of results.txt.
Mar 5 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Oleg Ogurok | last post by:
Hi all, On my web page, I have a <OBJECT DATA="mydatafile.ica" ...> which loads Citrix ICA web client. The problem is that I want to generate the mydatafile.ica on the fly (e.g. based on...
2
by: Bill Sneddon | last post by:
Can any one tell me how to output the following string? <%response.write "<tr><td><a href=""file://SERVER/mmlogs/TNAME" & yearmonth & """>"& "MYJUNK" & "</a><BR></td></tr>" %> ...
0
by: Dimitre Novatchev | last post by:
You seem to be unaware of the xslt processing which uses the built-in rules in the absence of templates that match some selected node. http://www.w3.org/TR/xslt#built-in-rule According to the...
4
by: Richard Tierney | last post by:
To create help output (the response to "myprog --help", for example) I currently create a big .h file, which includes a single string, such as: static char *help_text = "\ myprog: my program\n\...
6
by: Wescotte | last post by:
I'm writing a tiny php app that will log into our bank of america account and retrieve a file containing a list of checks that cleared the previous day. The problem I'm running into is when I...
1
by: Aalok | last post by:
This is what i want to do. Read a text file as an input and based on that file, Create an outpu text file which saves the contents of the input file in a specifi format in the output file. I...
4
by: ed | last post by:
Hi all, I'm very new to vb (2nd day) and I need to create a small app that will replace my old batch file with a flashy gui. I had some experience with access 2.0 which helps ;) What I would...
1
by: galivio | last post by:
I need a code in C where accepts inputs coming from an external text file and will give an output stored on another text file. For example, a C program to compute the sum of the two integers. The...
1
by: dwaterpolo | last post by:
Hi Everyone, I am trying to read two text files swY40p10t3ctw45.col.txt and solution.txt and compare them, the first text file has a bunch of values listed like: y y y y y y y
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.