mercredi 21 mars 2018

Read from file1.txt characters & numbers then if character copy it to file2.txt if number open file3.txt

Hi I have the following task in c++.

I'm working on 3 files txt.

File1.txt contains characters and integer numbers, like this: ACBDSN123KN3333NSNFIOVN8DF12G45FF

File2.txt contains only characters, like this: AHUAHUHUHUAHSUDHUIHHUCHCUDUNCDJCNDJCNSJNCDKJCNSKJCD

File3.txt is empty

Now i'm going to explain the problem.

I have to open the File1.txt and read type by type (character or number): if there is a character I have put it in the empty File3.txt; otherwise if there is a number like 123 (complete integer number, in the example if there is 123 I have to consider it like one integer, not three integers 1,2,3) I have to copy 123 letters from File2.txt to File3.txt

Aucun commentaire:

Enregistrer un commentaire