473,472 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

display results

3 New Member
hello..i'm trying to display my result in text file..
how am i going to display from printf command to display at
text file?
this is the example of of line need to be display in text file =

printf("Source address ::: %s\n",inet_ntoa(from.sin_addr)

i want to display this result in text file..
Jan 28 '08 #1
1 1866
gpraghuram
1,275 Recognized Expert Top Contributor
hello..i'm trying to display my result in text file..
how am i going to display from printf command to display at
text file?
this is the example of of line need to be display in text file =

printf("Source address ::: %s\n",inet_ntoa(from.sin_addr)

i want to display this result in text file..

Are you trying to display content from a text file to the STDOUT?
If this is is your requirement then you should first open the text file and then read it line by line and then display the read string.

Or
If you want to display the content as it is then use system call with type command like this
Expand|Select|Wrap|Line Numbers
  1. system("type <your text file>"); //in case of windows
  2. system("cat <your text file>"); //in case of Unix
  3.  
Raghuram
Jan 28 '08 #2

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

Similar topics

2
by: erica | last post by:
Hi, I am currently writing PHP code for some polling software. When someone votes, it stores their IP address in the database. From then on, they cannot vote in that particular poll, they only...
0
by: Follower | last post by:
Hi, I am working on a function to return extracts from a text document with a specific phrase highlighted (i.e. display the context of the matched phrase). The requirements are: * Match...
6
by: Jules | last post by:
Hi: I have an Access 97 Search form set up - a couple of combo boxes, a couple of text fields and a command button. I want the command button to run an SQL script and then open the results form....
3
by: google | last post by:
This is something I've done plenty of times in '97, but I can't seem to get it to work correctly in Access 2003. Say, for example, I have a form with an unbound combobox, the data source is a...
0
by: mkd1919 | last post by:
I have a website that performs a search on an indexing service and returns the results. During the initial load, I get the recordcount through a DS, then bind a DataList using a second DS with...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
2
by: ayasofya | last post by:
Hi..i'm very new to thic C++ programming..in doing my assignment i face some difficulties..first 1) i use 2 dimension of array e.g," 1 columns and 5 numbers under each column"...and i ask the user...
5
by: PHPBABY3 | last post by:
Hi, 1. I have two SQL tables. I will call them employees and departments: EMP: LAST_NAME, FIRST_NAME, DEPTNM DEPT: NUM, NAME Input: text string FIND Output: the LAST_NAME, FIRST_NAME...
4
by: murrayatuptowngallery | last post by:
I started a JS project (my first) a year or two ago, got distracted & am just now getting back to it. By luck I had somehow found a way to collect data with a form, perform calculations with...
0
by: JP Romano | last post by:
Hi... I'd like to display the results of a formula on a userform to alert users that certain operations are still in progress. Essentially, when the user clicks a button to compile results from...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.