Search:

Type: Posts; User: haroldco

Search: Search took 0.00 seconds.

  1. Okay so nothing worked. I've tried cutting up the...

    Okay so nothing worked. I've tried cutting up the string into words, cutting them up into tokens then analyzing them. NOTHING WORKS :| So I started over and I'm back at trying to figure out a way to...
  2. But im pretty sure that the problem lies in the...

    But im pretty sure that the problem lies in the snippet of code that was posted at the start of this thread. The program uses command line arguments.
  3. Okay I corrected that part but it still doesn't...

    Okay I corrected that part but it still doesn't work properly :( Maybe posting my whole code might help:



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
  4. Finding and replacing a string in a given string using strtok

    This is the snippet of my code that is supposed to find a certain string which is argv[1] within a given string (strings) and once found, replace that string with another string argv[2]. I designed...
  5. Replies
    6
    Views
    957

    So I tried this out and it didn't work. A smiley...

    So I tried this out and it didn't work. A smiley was printed out when I used this function in a program:



    void findword(char origstring[1000],char newstring [1000],char newword[100],char...
  6. Replies
    6
    Views
    957

    Oops! I made a mistake. I changed oldword[x] to...

    Oops! I made a mistake. I changed oldword[x] to oldword[y] so that after each loop, oldword will start at index 0 again. --> So it checks with the whole word. I end up having the index where the word...
  7. Replies
    6
    Views
    957

    Okay so i figured out a way to find the word...

    Okay so i figured out a way to find the word wherever it is on the line and then one i find the word, my function will replace the word right away. What I can't figure out to do is how to replace the...
  8. Replies
    6
    Views
    957

    Reading strings :(

    So I'm try to make a function that will receive a string (ex. "Hello I'm fine") and replace a word in that string with another word. The parameters of the function would therefore be the string...
  9. Thread: Weird Hanging

    by haroldco
    Replies
    5
    Views
    1,119

    Can't believe I missed that! :( HAHA. Finally...

    Can't believe I missed that! :( HAHA. Finally finished the program. Thanks I owe you one :)
  10. Thread: Weird Hanging

    by haroldco
    Replies
    5
    Views
    1,119

    Okay so I did what you told me and I narrowed it...

    Okay so I did what you told me and I narrowed it down to this piece of code:


    //function for the input of the coefficients a11 to a55 and b1 to b5
    void get_coefficients(float a[6][7])
    {...
  11. Thread: Weird Hanging

    by haroldco
    Replies
    5
    Views
    1,119

    Weird Hanging

    Okay so I made a program that is supposed to find the values of 5 variables given a system of 5 equations. Everything goes through the compiler without error and when i run the program, it outputs...
  12. Thread: Function help

    by haroldco
    Replies
    1
    Views
    956

    Function help

    So i made a simple function to get the absolute value of a float type number because the abs() function outputs integer numbers.

    When i compiled the program, an error message popped out.
    ...
  13. Replies
    2
    Views
    910

    strings and arrays

    I'm kind of confused with all these arrays and strings. I have to make a program that will check if a word which is inputted by the user is a palindrome or not. I have an idea of how the code could...
  14. Thread: Code help!!

    by haroldco
    Replies
    6
    Views
    1,071

    So i replaced line 29 with x=x/10 then added...

    So i replaced line 29 with x=x/10 then added x=abs(x). The program still doesn't want to work. i tried running a separate program with this bit but it still did not work. I do not see the problem :|....
  15. Thread: Code help!!

    by haroldco
    Replies
    6
    Views
    1,071

    Code help!!

    So I tried to write a program that would add two fractions and display a simplified (mixed/non mixed at down to lowest terms) fraction as its output. The user is tasked to enter input in the form a/b...
  16. Replies
    7
    Views
    2,121

    I made a mistake in the variables. Newnum wasn't...

    I made a mistake in the variables. Newnum wasn't supposed to be a variable. My bad. Here is the updated code which still doesn't work. And yes I used the Euclidean Algorithm for this code. Doesn't...
  17. Replies
    7
    Views
    2,121

    that's the thing. i can't figure out what's wrong...

    that's the thing. i can't figure out what's wrong with the code :(
  18. Replies
    7
    Views
    2,121

    Simplfiying proper fractions

    So i wrote code to simplify a proper fraction in the form a/b provided by the user.



    #include <stdio.h>
    #include <stdlib.h>


    int newnum, num, den, t, a, b;
    int main()
  19. Thread: Code help!!

    by haroldco
    Replies
    3
    Views
    758

    Code help!!

    So i wrote out a snippet of my code for a program that is supposed to add and later simplify two fractions. To check if the first part of my program was working, I ran a side program with this code:...
Results 1 to 19 of 19