Search:

Type: Posts; User: clmoore3

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,468

    Ok, i can compile cleanly, i forgot to add...

    Ok, i can compile cleanly, i forgot to add prototypes for the two new functions. Any help / explanation for the bitwise operators. I dont understand how they work to get the functions to work how...
  2. Replies
    4
    Views
    1,468

    Bitwise operations and functions

    Hi, I'm currently trying to understand bitwise operations more. I am doing an excersice out of K.N. King that wants me to write functions given the prototypes. rotate_left is suppose to return the...
  3. Replies
    5
    Views
    1,145

    I guess i'm still not following on what needs to...

    I guess i'm still not following on what needs to happen. Anyway you can describe in words what needs to go on in my erase function besides what I have?
  4. Replies
    5
    Views
    1,145

    Using erase function Help

    I have got this program, inventory2.c, which allows a user to store a database of parts. It uses command-line switches to determine what course of action to take. I'm trying to add a command-line...
  5. Thread: Function Help

    by clmoore3
    Replies
    2
    Views
    958

    Ok I fixed the first error with the implicit...

    Ok I fixed the first error with the implicit declaration. How do i fix the second error, I don't understand why Im getting it
  6. Thread: Function Help

    by clmoore3
    Replies
    2
    Views
    958

    Function Help

    I'm needing to code a function named display_lines, the parameter to this function is a char **p; I need help on getting it right, im getting implicit declarations and I don't understand why. Most of...
  7. Replies
    4
    Views
    789

    What do the two values correspond to then...

    What do the two values correspond to then lines[x][y]?
  8. Replies
    4
    Views
    789

    Can somebody explain this?

    I'm suppose to use this prototype : char **read_lines(FILE *fp) for a function. The function is should read all lines in a given file and store them in a NULL-terminated array of strings.

    What is...
  9. Replies
    11
    Views
    1,241

    Heres my current code if anyone can take a look...

    Heres my current code if anyone can take a look for me:



    /*
    Name: readfile4.c
    Purpose: Similar to readfile3.c, with a re-implementation of readLine
    Author: Bill Slough

    Bugs:
  10. Replies
    11
    Views
    1,241

    -+The function has to deal with malloc and...

    -+The function has to deal with malloc and realloc functions, but we had to make our own "safe" versions in which if it returns null, it exits our program. So, the function we need to allocate a...
  11. Replies
    11
    Views
    1,241

    capacity is an int, a part of this function has...

    capacity is an int, a part of this function has to handle memory allocation, the designeted memory(starting capacity) would be 10, i need to reallocate memory (doubling capacity each time), but at...
  12. Replies
    11
    Views
    1,241

    Okay, i've been working pretty hard trying to...

    Okay, i've been working pretty hard trying to understand this. I have my safe_malloc and safe_realloc functions, and I have changed my readLine funciton around. My program is compiling, but with...
  13. Replies
    11
    Views
    1,241

    By a safer_realloc, its just the same function as...

    By a safer_realloc, its just the same function as the realloc, but we are to add a part to it that ends the program if it cant realloc anymore memory. My main problem is changing the readLine...
  14. Replies
    11
    Views
    1,241

    Thank you, and its working, but I have to...

    Thank you, and its working, but I have to re-implement it for the given instructions. I dont know how to change the function in the way my professor is looking for.
  15. Replies
    11
    Views
    1,241

    Function Problem

    I have a program in which I have a function already created. The function works how it was suppose to for the previous program, but now we are to improve it. So i need to re-implement this function...
  16. Replies
    9
    Views
    1,638

    So something like this? void Sort(char *s,...

    So something like this?



    void Sort(char *s, int n, FILE *fp) {

    string line1 = readLine(char *s, int n, FILE *fp);

    while(readLine(line2, sizeof(line2), fp) !=NULL) {
    int...
  17. Replies
    9
    Views
    1,638

    Can anyone help?? Its crucial i have this done....

    Can anyone help?? Its crucial i have this done. and i dont know how to do it
  18. Replies
    9
    Views
    1,638

    I think he mightve mentioned something about...

    I think he mightve mentioned something about selection sort, but i cant find anything in my book about sorting, except searching and sorting utilities.
  19. Replies
    9
    Views
    1,638

    Ok updated my readLine() code, can anyone help me...

    Ok updated my readLine() code, can anyone help me with a Sort function now? Suppose to just put the contents of a file in order then print it out in the terminal, i dont even have to output it back...
  20. Replies
    9
    Views
    1,638

    Poor means poooorrrr lol. It can be simple as...

    Poor means poooorrrr lol. It can be simple as possible, all it needs to do is sort the contents of a file. like a .txt that has pig\ncat\ndog\n as the contents, it will print the contents of the file...
  21. Replies
    9
    Views
    1,638

    Sort Program Help

    Hi, needing help with c programming. Im suppose to make a "poor mans" variation to the Sort function built into unix. The program is suppose to read in a file and sort the contents of the file. So...
  22. Thread: Sort Program

    by clmoore3
    Replies
    1
    Views
    955

    Sort Program

    I have to make a program for my topics class that is a "poor mans" variation to the unix sort command. Program is suppose to read a filename in as a command line argument. We are suppose to use the...
  23. Replies
    4
    Views
    966

    EOF Help NEEDED!

    Hi i have a program getting input from a user, I need to incorporate a way for the program to end if the user presses CTRL + D while entering their input. I know you use EOF but i dont understand how...
  24. Replies
    4
    Views
    986

    ok that works, How would i set this up so that i...

    ok that works, How would i set this up so that i can have the user enter as many numbers as they want, until they hit a certain button on the keyboard, like ctrl + d?
  25. Replies
    4
    Views
    986

    Ok i fixed the printf, put the signature of the...

    Ok i fixed the printf, put the signature of the function before the main, and took out the & sign, it compiles, but it gives me this error in output.


    connor@connor-VirtualBox:~$ cd hw06...
Results 1 to 25 of 48
Page 1 of 2 1 2