Thread: Read words and numbers from a file

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    7

    Question Read words and numbers from a file

    I would like to know how to read words and numbers from a file so that the words are still words and the numbers can be used as numbers.

    Every example/tutorial I find for reading a file in C is either just characters or numbers, but never both.

    thanks

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    How do you think you would do it? I don't see you making any attempt. Why, I bet you haven't even read the Announcements. That would be a good place to start.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    7
    Hey Quzah if you do not have anything helpful to say don't reply.

    I've seen your know all over the boards and all you do is assume others are lazy ignorant people who just want to be told how to do everything.

    I have spent many hours searhing for a solution and playing with code, but still cannot figure out this one particular aspect.

    Even you must have been shown how the basics. You weren't just born with the all knowledge in programming.

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Hey dumbass, go read the announcements. What have you tried? Have you told us what you have tried? Have you shown us your attempt at trying? No? Well then how the hell am I supposed to know what you've already tried? Take your word for it? Why should I? You're flagrantly ignoring the forum rules.

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User
    Join Date
    Apr 2003
    Posts
    7
    Like I said, Quzah, don't reply if your only ability is to degrade other people.
    Don't you have anything better to do all day?

  6. #6
    Hello,

    Hence the sentence structure of Quzah's post, he actually did post something "helpful".

    How's that?
    » He said specifically: "I don't see you making any attempt". As you may know, we are here to help people. Though we can't help you if you don't show your part. Quzah was looking for just that. The worst thing you can do is whine about the experience rather than decipher the post and learning what the true motive was.

    • Your initiative to write this.
    • What you've tried.
    • What you are struggling on.

    The main issue is writing a whole program for someone. Beyond tips, most users are looking for handouts. We don't mind hinting, helping, or leaving useful tips, though it is a different story when you present a generic question and look for a complete answer.

    This question however is looking for an answer that outweighs help. Maybe a more precise question could lead you toward an informative answer. Here are some useful tips:

    • Describe the symptoms of your problem or bug carefully and clearly.
    • Describe the research you did to try and understand the problem before you asked the question.
    • Describe the steps you took to try and pin down the problem yourself before you asked the question.

    This is just for future reference when asking a question. It's always best to know your problem with detail, rather than not knowing it at all.


    - Stack Overflow
    Last edited by Stack Overflow; 11-04-2004 at 05:02 PM. Reason: Sentence structure
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. seg fault at vectornew
    By tytelizgal in forum C Programming
    Replies: 2
    Last Post: 10-25-2008, 01:22 PM
  3. Replies: 5
    Last Post: 12-21-2007, 01:38 PM
  4. Trying to count numbers in file
    By ammochck21 in forum C++ Programming
    Replies: 25
    Last Post: 11-17-2006, 12:32 PM
  5. How to copy a word or numbers from text to other location
    By trancedeejay in forum C Programming
    Replies: 12
    Last Post: 02-09-2006, 06:43 AM