CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Paul McKenzie

Search: Search took 2.93 seconds.

  1. Re: how to read a wide charcter one by one from a *.txt file in c++

    First, why do you need to read character by character? That is very slow. Read in an entire line and process the characters as you see fit.

    The following code works correctly:

    ...
  2. Re: how to read a wide charcter one by one from a *.txt file in c++

    So you're saying the problem is with the get() function??
    What are "rough digits"?

    This shouldn't be hard -- open your input file in a hex editor (not a text editor, a hex editor). Look at the...
  3. Re: how to read a wide charcter one by one from a *.txt file in c++

    Where are the files? All I see are images.

    Regards,

    Paul McKenzie
  4. Re: how to read a wide charcter one by one from a *.txt file in c++

    Also, the correct while() loop would be this:


    while ( ! inputfile.eof() && i < 50 ) Your other while loop() would fail miserably if the file has less than 30 characters.,

    Regards,

    Paul...
  5. Re: how to read a wide charcter one by one from a *.txt file in c++

    Forget about the file for a moment. What is the value of array[i]? Is it the correct value? If so, then the next questions should concern the file, otherwise please confirm what the value of...
  6. Re: how to read a wide charcter one by one from a *.txt file in c++

    If your file has more than 50 characters, your program corrupts memory.


    wchar_t arry[50];
    //...
    int i=0;
    while ( ! inputfile.eof() )
    {
    arry[i] = inputfile.get();
Results 1 to 6 of 6





Click Here to Expand Forum to Full Width

Featured