Search:

Type: Posts; User: Sn0wcra5h

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    16,949

    Ah, yes - I see this now. What I want to do is...

    Ah, yes - I see this now.

    What I want to do is read the full file, word by word, and write this into my buffer (hold).

    Here I can have the program read through all the files, word by word,...
  2. Replies
    3
    Views
    16,949

    Reading file using fscanf into array

    Hi all,

    I'm sure that I'm missing something silly, but either I'm not reading the file into the array correctly or I'm not outputting it correctly. I can see my program looping from my printf...
  3. Replies
    3
    Views
    1,725

    strcmp failing

    Hi,

    I'm receiving the following error upon compiling my program. Can anyone point me in the right direction to get the strcmp to work?

    Function argument assignment between types "const char*"...
  4. Replies
    3
    Views
    17,018

    Thanks - that makes more sense that what I was...

    Thanks - that makes more sense that what I was thinking... where I'd start with an array filled with different delims and run through counting code EACH time.
  5. Replies
    3
    Views
    17,018

    Best method for counting tokens

    I'm writing a program that counts all of the tokens in a given file ("search"). I can count the number of "#" signs in the file, but I need to name a number of other tokens... {}()/... and output...
  6. Thread: System calls

    by Sn0wcra5h
    Replies
    10
    Views
    3,977

    Thanks guys! This was a quick fix, I really...

    Thanks guys! This was a quick fix, I really appreciate your responses.

    Alexander jack: After removing the quote characters and their corresponding escape characters, I got the results that I...
  7. Thread: System calls

    by Sn0wcra5h
    Replies
    10
    Views
    3,977

    System calls

    I want to use a system call to copy (cp) a source file to a backup directory. I need to pass the source and destination paths via command prompt, but the only way I've been able to get the system...
  8. Thanks cas. I did try using snprintf, but I'm...

    Thanks cas.

    I did try using snprintf, but I'm not able to get the glob command to work with my string created with snprintf. My output is:

    # ./globprog /home/myuser
    1: This is argv[0] =...
  9. Passing pathname argument in glob() function

    Is it possible to pass a pathname to glob()?

    I have sample code that I've tried to modify to accept a pathname and use this to search the path given. The code below only searches the present...
  10. Replies
    1
    Views
    2,468

    Formatting output with printf

    Hi all,

    If I create a variable as a float type and then print this number out to the screen with anything other than a %f format, such as %d, I get a *seemingly* random number.

    Is C doing some...
  11. Replies
    1
    Views
    1,460

    Detecting Keys

    I've read quite a few posts on detecting function keys using special libraries. Is it possible to read the hex value of the key intead of using a library?

    I basically want to end up with an if...
  12. Thread: Data Types

    by Sn0wcra5h
    Replies
    1
    Views
    1,386

    Data Types

    Is multiplying a floating point by an integer possible without converting the int to a floating point or vice versa?

    For instance, if I use my results are unexpected and I have a feeling it's...
Results 1 to 12 of 12