By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,849 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,849 IT Pros & Developers. It's quick & easy.

code to save information on a text file

P: 6
#include <stdio.h>
#include <dos.h>
#include <conio.h>

/*****************************************/
/*This function read parallel port inputs*/
/*****************************************/
hi,

I have this piece of code below to read data from praralell port. however i now need a piece of code that would save the data to my created text file after reading it from the parallel port.

please help
thank you


int Read_Input()

{int Byte;

Byte=inportb(0x379);
return Byte;}

void main (void)

{int PP_Input;

clrscr();
PP_Input = Read_Input;
printf("%d",var);
getch();}
Mar 20 '07 #1
Share this Question
Share on Google+
3 Replies


P: 6
hi,

I have this piece of code below to read data from praralell port. however i now need a piece of code that would save the data to my created text file after reading it from the parallel port.

please help
thank you



#include <stdio.h>
#include <dos.h>
#include <conio.h>

/*****************************************/
/*This function read parallel port inputs*/
/*****************************************/


int Read_Input()

{int Byte;

Byte=inportb(0x379);
return Byte;}

void main (void)

{int PP_Input;

clrscr();
PP_Input = Read_Input;
printf("%d",var);
getch();}
Mar 20 '07 #2

RedSon
Expert 5K+
P: 5,000
Your threads have been merged, do not double post.

MODERATOR
Mar 20 '07 #3

Expert 100+
P: 1,510
have a read thru this tutorial on file I/O
http://www.cprogramming.com/tutorial/lesson10.html
Mar 20 '07 #4

Post your reply

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