Search:

Type: Posts; User: flightsimdude

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,296

    hammer or anyone else...

    What would the declaration for the charcter array look like if I want to copy the string(s) into that I find? I will need a char array that can handle up to 20 occurances of a string in a file. Each...
  2. Replies
    5
    Views
    1,296

    hammer thanks...I'm almost at wits end...I will...

    hammer thanks...I'm almost at wits end...I will look at what you have (i.e., fgets, etc) and try to incorporate it into code to search through a file to look for the string I need. I know I've said...
  3. Replies
    5
    Views
    1,296

    strings....

    How can I search a file for a string and then copy it to a string variable?
  4. Replies
    11
    Views
    1,783

    Dave, you're right I apologize. I did previously...

    Dave, you're right I apologize. I did previously post code although I have changed it quite a bit. The only question I really need answered is:
    When I locate the string I want to copy, how do I copy...
  5. Replies
    11
    Views
    1,783

    I guess I was tired when I originally wrote this....

    I guess I was tired when I originally wrote this. What I really need to do is be able to do the following:

    1. Search for multiple occurances of a string.
    2. Each string that I ultimately want to...
  6. Replies
    13
    Views
    5,702

    thanks guys. It's late for me now. Ill be back...

    thanks guys. It's late for me now. Ill be back tomorrow after I try what you have conveyed to me. Thanks again!
  7. Replies
    13
    Views
    5,702

    ok I'm completely humbled...not that I needed...

    ok I'm completely humbled...not that I needed any! How do I advance the pointer...or is there another simpler way to read through the file and ignore the blank lines and lines that are comment only...
  8. Replies
    13
    Views
    5,702

    twm...you kind of blew me away with the stripping...

    twm...you kind of blew me away with the stripping of the white space..my previous reply was to hammer's I didn't see yours until after I replied. Any advice on my previous reply...either twm or...
  9. Replies
    13
    Views
    5,702

    good advice. All comment lines are of the syntax...

    good advice. All comment lines are of the syntax "//". Would I be wise to choose the function 'getc' to search for a new line '\n' followed by the '/' and then another '/'? or is there a better way...
  10. Replies
    11
    Views
    1,783

    funny...and thx hammer

    funny...and thx hammer
  11. Replies
    13
    Views
    5,702

    I would want to exclude those lines which are...

    I would want to exclude those lines which are blank and those that are entirely a comment line. Just not sure how to do this.
  12. Replies
    13
    Views
    5,702

    count only lines of code...

    Question: How can I only count the lines of code in a source file and ignore the comment lines and blank lines?
    For example, if I have a source file as follows how would I only count the lines as...
  13. Replies
    11
    Views
    1,783

    string search question...

    What is the preferred method to search for a string and then copy only part of the string? For instance. I want to search for a string called:
    "@foobar@"
    I only want to copy the "foobar" part.
    ...
  14. Replies
    2
    Views
    33,424

    passing a filename as a parameter..

    How can a filename be passed as a parameter from one function to another function? For instance I have a filname as a string defined as:
    char[] = "filename.txt" ;
    What would the format of the...
  15. Replies
    8
    Views
    2,582

    twm, never mind...figured it out..

    thanks a bunch for your input...I should have been more patient with myself and just figured it out (like I did) before I posted. I'm still glad I asked the questions though. You showed me...
  16. Replies
    8
    Views
    2,582

    twm...

    I'm being a bonehead...I got this part working...thanks for your input. My problem was not using the correct type for 'b1'. I fixed that and it's ok. I have a new problem where I first use the...
  17. Replies
    8
    Views
    2,582

    not sure if my last post

    got in or not. please see last post for code and data set.
    Thanks!
    Flight
  18. Replies
    8
    Views
    2,582

    still need help...

    The data file looks like this:
    132.34
    100
    235
    7859.03
    444.31
    332
    298
    545.77
    676
  19. Replies
    8
    Views
    2,582

    sounds good but what do you think of

    using sscanf. The data file is only a sinle column of 10 integers and floats. Let me know if you think sscanf will work.
    Thanks!
    flight
  20. Replies
    8
    Views
    2,582

    reading int's and floats...

    I need to read integers and floating point data from a file and calculate the mean and variance. I know how to perform the calculations, however I don't know where to start when it comes to reading...
  21. Replies
    10
    Views
    12,076

    hammer...what are your thoughts...

    Thanks again!
    flight
  22. Replies
    10
    Views
    12,076

    it worked but...

    would you consider this an unelegant method? Don't get me wrong I sincerely do appreciate your reply!
  23. Replies
    10
    Views
    12,076

    here's my code...

    the code works well except it will not count the last word in the file. I noticed the last word doesn't have a line feed at the end. How can I fix this?
    Thanks!
    flight






    include <stdio.h>
  24. Replies
    10
    Views
    12,076

    nice try no cookie...

    thanks dave..I looked at it tried what was suggested and still got the wrong answer...zero words counted s/b 7 words.
  25. Replies
    10
    Views
    12,076

    sorry here is the source code attachment

    attached is the source code file.
Results 1 to 25 of 27
Page 1 of 2 1 2