Deal all,my prob:how can i pass data in a file after reading the file in C. i want to encrypt data of this file after reading the file.i know i cn use f commands to read data but want to pass the data later in second part of my program.sorry for any mystype..am typing with 1 eye.\plz advicethanks

Member Avatar for iamthwee

Where is your attempt. What file i/o tutorials are you using?

there are write commands.

if you are using C open up a terminal and type in "fwrite" or "write".

its important what you are using. For example use fwrite and fread together. don't combine write and fread.

Also on another note be careful how you use each. When u call functions like fread and fwrite they don't format the string as you would expect to. Functions like strlen and such won't work correctly because there is no \0 at the end of the string telling the computer its over.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.