Results 1 to 5 of 5

Thread: Count letters in a file c++

  1. #1
    Ezra Gabriel is offline Senior Member
    Join Date
    Jul 2011
    Posts
    319
    Rep Power
    2

    Default Count letters in a file c++

    Hello, I'm in the process I write a program with which I can count the individual letters of a file finally, to be output, how many aA ... currently in a file are available. large and small, should be added together. now recognized to be only then if I want to count the bB (the commented-out), then this does not work anymore and the program plunges off. I thought to myself, I start at some point in aA, then increase the letter if there is no consensus and so on, thanks in advance!

  2. #2
    Jones Pinto is offline Senior Member
    Join Date
    Jan 2012
    Posts
    152
    Rep Power
    2

    Default

    Hi In the while Feof loop you have a flaw, if this is uncommented uncommented triest you the first letter, whether he is an only if he is the second letter is checked only on b, the third party only on c, etc, if the file has more than 26 letters, get updated very often by two problems: Already on it was because z is assessed on some odd characters. And the array that has only 26 seats, is on the 27th, 28th etc accessed the crash is likely for each file, all letters must be tested is because the letters come in a row without loop, and a query as to whether the file letter is anything from a to z Not a digit or so should also clean.

  3. #3
    Lawrence Souza is offline Senior Member
    Join Date
    Jan 2012
    Posts
    156
    Rep Power
    2

    Default

    Many thanks alpha states for alphabet yeah right, I've since forgotten the loop only if he is a the second letter is checked only on b, the third party only on c, etc I check with the | | is not whether the letter is small or large pay, blank, etc. do not matter there are only important letters.

  4. #4
    Abdiel Motes is offline Member
    Join Date
    Dec 2011
    Posts
    91
    Rep Power
    2

    Default

    Just cast, as noted in the other loop letters But there have probably noticed yourself degree, because the text is now gone, currently you have something in the code: For some languages there own code rather than code, for C + + is cpp Because there are some languages but, not get updated very often in a separate button for each editor must be entered manually, a list can be found in the code tags link in my signature.

  5. #5
    Felix Magdalena is offline Senior Member
    Join Date
    Jan 2012
    Posts
    134
    Rep Power
    2

    Default

    All clear, I thought when I viewed my cmd program for that then. c file is executed mistake, although the c code has changed, but I forgot the exe create a new file what strikes me now, but still, now when I start my prime factor tool, so only the exe.

Similar Threads

  1. Changing PC Drive Letters
    By SmithJohnson in forum Flash Drives
    Replies: 0
    Last Post: 02-11-2010, 01:10 PM
  2. How To Count The numeral Of typeset?
    By CoxWatson in forum Programming
    Replies: 1
    Last Post: 02-10-2010, 04:25 PM
  3. C program for to count (-) and (+) numbers.
    By MoralesMyers in forum Programming
    Replies: 1
    Last Post: 01-19-2010, 05:39 PM
  4. Better drive letters (XP and Vista)
    By macrona in forum Windows XP
    Replies: 0
    Last Post: 03-30-2009, 10:02 AM
  5. Transistor Count
    By vandana43 in forum Processors
    Replies: 0
    Last Post: 03-19-2008, 11:15 AM

Tags for this Thread

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