Thread: Program keeps crashing; attempting to extract each string (word) from text file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    Quote Originally Posted by algorism View Post
    sizeof is not a function call. It's an operator. It doesn't need parentheses. The parentheses that are sometimes necessary are actually the cast operator.

    Code:
    int x;
    size_t s1 = sizeof x;
    size_t s2 = sizeof (int);
    It does need parentheses if it is typename instead of expression. But here it is expression, so right, it is fine.

    Anyway, it does not crash for me and I could not find any error by looking at the code.

  2. #2
    Registered User
    Join Date
    Mar 2016
    Posts
    14
    ok thanks for your help

  3. #3
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    Quote Originally Posted by blongnec View Post
    ok thanks for your help
    So you thank a guy that can't help you but don't bother thanking me for helping you in your other thread?
    F you, buddy!
    (I see what's wrong with your program, btw.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Searching a specific string/word/etc in a text file?
    By zacharyrs in forum C Programming
    Replies: 5
    Last Post: 11-29-2009, 07:54 PM
  2. reading text-and-numbers file word by word
    By bored_guy in forum C Programming
    Replies: 22
    Last Post: 10-26-2009, 10:59 PM
  3. Extract Title from plain text file
    By Todd88 in forum C++ Programming
    Replies: 10
    Last Post: 11-21-2008, 09:47 AM
  4. How to extract (formatted) text from a PDF file?
    By HeinzB in forum C++ Programming
    Replies: 2
    Last Post: 08-19-2008, 02:46 AM
  5. Help reading text file word by word
    By Unregistered in forum C++ Programming
    Replies: 6
    Last Post: 05-25-2002, 05:13 PM