Results 1 to 3 of 3

Thread: [C/C++] Conversion of files

  1. #1
    Madge555 is offline Senior Member
    Join Date
    Nov 2008
    Posts
    220
    Rep Power
    4

    Default [C/C++] Conversion of files

    Hello to all

    I tried to schedule something in Batch but I was advised a language somewhat more complete for that,here's what I do:

    - Create a. Txt file for each file. Csv present in the folder where the program is located by running the following changes:

    xxx.csv (consisting of two columns of numbers separated by tab)

    1 0
    2 0.1
    3 0.2
    4 0.3
    5 0.5
    6 0.7
    ... ...

    in this file xxx.txt

    n
    0
    0.1
    0.2
    0.3
    0.5
    0.7
    ...

    where n represents the number of lines in the file xxx.txt (minus line n of course)

    Could you help me?

    Thank you in advance

  2. #2
    ABEDNEGO87 is offline Banned
    Join Date
    Nov 2008
    Posts
    197
    Rep Power
    0

    Default

    In C, use fopen, fgets or fread, fprintf or fwrite, and fclose.

  3. #3
    CALANTHA is offline Senior Member
    Join Date
    Nov 2008
    Posts
    263
    Rep Power
    4

    Default

    In script:
    xxx.csv wc-l | cut-f 1-d ''> xxx.txt; awk '(print $ 2)' <xxx.csv>> xxx.txt

Similar Threads

  1. HTML to XML Conversion
    By CarterWatson in forum General Software Terms
    Replies: 2
    Last Post: 02-18-2010, 05:26 PM
  2. errors in pdf to doc conversion
    By krgokul in forum Applications
    Replies: 0
    Last Post: 02-05-2009, 08:54 AM
  3. AC-DC Voltage Conversion
    By Madge555 in forum Power Supply
    Replies: 0
    Last Post: 11-25-2008, 08:04 AM
  4. Format Conversion
    By aiantin465 in forum General Software Terms
    Replies: 0
    Last Post: 10-21-2008, 10:11 AM
  5. Batch Conversion
    By aiantin465 in forum General Software Terms
    Replies: 0
    Last Post: 10-21-2008, 10:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48