473,834 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
+ 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 1886
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
1976
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 view the results. There are several polls in the database, and there is a field called "status". When it is 0, the poll is "active" and can be voted upon. When it is 1, it is archived and one can only view the results. But, there seems to be...
0
1951
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 should be case-insensitive, but extract should have case preserved.
6
2318
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. I can get the button to open the other form but I can't get it to run the module with the subroutine in it. This is my first sorti into programming Access so be kind - I have some SQL and ASP experience but these modules are a problem for me.
3
4051
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 table of customers, first column is the key field, which is hidden with a 0" width, and the second column is the customer name. The SQL is a union query that also inserts Null in the first column, and "All" in the second column. That combobox gets...
0
1175
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 page count of 20. This site executes successfully on my local machine and indexing service. When ran on the intended server, the app retrieves the record count, then binds the data in the 2nd DS, but doesn't display the records bound to the...
2
7057
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, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply. Each dynamically created row will return 3 values fee1_choice, fee1_unit and fee1_money. Note The above informaton is...
2
2549
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 the fill the numbers 2)Then, i want display back all the numbers that have been stored but it just display the last number in the column..i don't have any idea to make it display all the inputs.. Here, the programme that i've written so far...if...
5
2765
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 and department name NAME (link DEPTNM
4
2388
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 JavaScript and display the form and calculated results on the same screen. Now I can't figure out how to do that again. The only methods of reporting the calculation results seem to display a completely new screen/window.
0
1438
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 28,000+ api calls, the form will display with the formula results (which I'd prefer not to have in a cell on the worksheet) and options to proceed with partial results, or to cancel the operation and wait for a period of time. It works with the...
0
9800
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9651
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10516
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10556
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10225
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9339
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7762
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6960
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3085
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.