C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Petit exercice en C++

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French)
View previous topic :: View next topic  
Author Message
nospam
Guest





PostPosted: Sun Mar 06, 2005 6:30 pm    Post subject: Petit exercice en C++ Reply with quote



Bonjour à tous,

Je ne suis pas programmeur et je cherche quelqu'un qui pourrait
me créer le petit exécutable suivant (pour Windows XP).

EN ENTREE :

- "Quel est le fichier ?" Je lui indique où il se trouve en cliquant dans
une petite boite de dialogue Windows (ex : "essai.txt")

- "A découper en combien de partie ?" Je lui indique un chiffre entre
2 et 9 (ex : 3)

Ensuite il lit en entrée le fichier texte "essai.txt" au format suivant :

*************** LIGNE 1 ************************
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccccccccccccccccccccccccccccccc
dddddddddddddddddddddddddddddddddddddddddddddddd
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
gggggggggggggggggggggggggggggggggggggggggggggggg
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

....et me le découpe en 3 (dans mon exemple) parties EGALES en
nombre de lignes (dans la mesure du possible) tout en recopiant la
1ère ligne à l'identique dans les 3 fichiers texte de sortie.

Ce qui donne les 3 fichiers suivants EN SORTIE :

"essai p1.txt"

*************** LIGNE 1 ************************
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccccccccccccccccccccccccccccccc

"essai p2.txt"

*************** LIGNE 1 ************************
dddddddddddddddddddddddddddddddddddddddddddddddd
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

"essai p3.txt"

*************** LIGNE 1 ************************
gggggggggggggggggggggggggggggggggggggggggggggggg
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

A noter que chaque ligne des fichiers texte se termine par un "CR + LF"
(carriage return + line feed).

Idéalement, j'aimerais qu'il mémorise le dernier répertoire utilisé
où se trouvait le fichier d'entrée. Dans tous les cas, les fichiers
de sortie iront dans le même répertoire.

Merci pour votre aide !

Bien Cordialement,

Christian email : [email]c9XXXc9 (AT) myrealbox (DOT) com[/email]
(enlever la partie "XXX" de l'email, je fais çà pour lutter contre le spam).



Back to top
Pierre Maurette
Guest





PostPosted: Mon Mar 07, 2005 10:05 am    Post subject: Re: Petit exercice en C++ Reply with quote



nospam a écrit :
Quote:
Bonjour à tous,

Je ne suis pas programmeur et je cherche quelqu'un qui pourrait
me créer le petit exécutable suivant (pour Windows XP).
http://assembleur.maurette.free.fr/temporaire/decoupe.zip

--
Pierre

Back to top
nospam
Guest





PostPosted: Mon Mar 07, 2005 4:18 pm    Post subject: Re: Petit exercice en C++ Reply with quote



Bravo Pierre et merci beaucoup, votre réalisation est remarquable !


Back to top
Pierre Maurette
Guest





PostPosted: Mon Mar 07, 2005 4:22 pm    Post subject: Re: Petit exercice en C++ Reply with quote

nospam a écrit :
Quote:
Bravo Pierre et merci beaucoup, votre réalisation est remarquable !


Attention, vite fait. Pas faire le test du singe, même pas celui du

panda endormi Wink
--
Pierre

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.