Search:

Type: Posts; User: gqchynaboy

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,485

    thanks I fixed it now it works int temp[10];

    thanks I fixed it now it works

    int temp[10];
  2. Replies
    3
    Views
    1,485

    Merge Sort - Invalid Output ??

    #include <iostream>

    using namespace std;


    void mergeSort(int a[], int low, int high);
    void merge (int a[], int low1, int high1, int low2, int high2);

    int main()
    {
  3. Replies
    2
    Views
    848

    File I/O Problem

    When I try to open a file it says it doesn't exist, but it really does though..

    Reader( string fileToRead );

    // To simplify the implementation, the user may either call "getLine" but
    //...
  4. Replies
    10
    Views
    5,467

    ^^ Not really, I'll try to figure out with the...

    ^^ Not really, I'll try to figure out with the code you tried to help me, its giving me a seg fault @ return sum(a, b, b+half) + sum(a, b+half+1, e);
  5. Replies
    10
    Views
    5,467

    ^^ Well you know more then me, thanks for the...

    ^^ Well you know more then me, thanks for the help =]
  6. Replies
    10
    Views
    5,467

    int sum (int a[], int b, int e) { if ( b ==...

    int sum (int a[], int b, int e)
    {
    if ( b == e) // assuming no # repeat
    return a[0];
    int n = (e-b)+1; // couldn't you just put "int n = b" ?
    int half = n / 2;
    return sum(a, b,...
  7. Replies
    10
    Views
    5,467

    This code segment sums up using recursive ...

    This code segment sums up using recursive



    int sum(int a[], int n)
    {
    if (n==0)
    return 0;

    int sumSoFar = sum(a, n-1)
  8. Replies
    10
    Views
    5,467

    Recursion - Sum

    I need to Sum up an array using Recursion however, I need to do 2 recursions. Sum off the first half then the second half then add them together and them add the middle to get the sum.


    does...
  9. Replies
    30
    Views
    3,892

    No need for attitude, like i said im working in...

    No need for attitude, like i said im working in Assembly Langauge and I guess the NOT operator works differently.
  10. Replies
    30
    Views
    3,892

    !0000 0010 = 0000 0000 !0000 0000 = 0000 0001 ...

    !0000 0010 = 0000 0000
    !0000 0000 = 0000 0001

    ! non-zero = 0
    ! 0 = 1


    One thing I dont understand how the NOT operator can turn a 2 into 0 then using the NOT again it turns the 0 into 1.
    ...
  11. Replies
    30
    Views
    3,892

    Oppz i added instead of and..thx man!!!

    Oppz i added instead of and..thx man!!!
  12. Replies
    30
    Views
    3,892

    So it would go something like this i would...

    So it would go something like this

    i would have b be an int though

    b = 1111 1111

    (1111 1111 & 1) = 0000 0000
    !(0000 0000) = F F
    !(0000 0000) = 0 0
  13. Replies
    30
    Views
    3,892

    I want simplicity =]

    I want simplicity =]
  14. Replies
    30
    Views
    3,892

    What does the !! mean? And is this for 128 bits?...

    What does the !! mean? And is this for 128 bits? and if i wanted 8 bits I would use
    return (!!(b& 1))+(!!(b& 2))+(!!(b& 4))+(!!(b& 8)))
  15. Replies
    30
    Views
    3,892

    Sorry but I dont think it will work, I forgot to...

    Sorry but I dont think it will work, I forgot to mention I need to count 8-bits :(
  16. Replies
    30
    Views
    3,892

    Counter the number of 1 bits?

    I'm having a trouble of thinking of way to count the number of 1 bits in a binary number with out using any condition tests or branches. Only ones i know have condition tests or branches like


    ...
  17. Replies
    8
    Views
    1,137

    Nevermind got it to work

    Nevermind got it to work
  18. Replies
    8
    Views
    1,137

    I can only get it to print out numbers 10-15 ...

    I can only get it to print out numbers 10-15






    if(base =='h')
    {
    int temp = x, quotient, remainder;
  19. Replies
    8
    Views
    1,137

    Any other ideas? I couldn't get it to implement..

    Any other ideas? I couldn't get it to implement..
  20. Replies
    14
    Views
    2,758

    Where not allowed to use sprintf or any other...

    Where not allowed to use sprintf or any other libraries just writeStr.
  21. Replies
    14
    Views
    2,758

    I can't use printf, but writeStr so when i use...

    I can't use printf, but writeStr so when i use writeStr("Decimal is %d", x); there are to many arguements of course



    #include <unistd.h>
    #include "writeStr.h"

    int writeStr(char *theString)...
  22. Replies
    14
    Views
    2,758

    http://www.cs.sonoma.edu/~stauffer/250S05/ProgProj...

    http://www.cs.sonoma.edu/~stauffer/250S05/ProgProjects/250S05.Project1.html

    "intToStr.c - This function takes three arguments, an unsigned int, the address of a char array, and a char indicating...
  23. Replies
    15
    Views
    3,347

    I just created my own Power function ...

    I just created my own Power function ...
  24. Replies
    14
    Views
    2,758

    we can't use scanf and printf......that is why we...

    we can't use scanf and printf......that is why we have to convert it ourselfs
  25. Replies
    15
    Views
    3,347

    How can I make this line work without using the...

    How can I make this line work without using the pow function?

    multiplier = (int)pow((double)10,(double)((length - 1) - i));
Results 1 to 25 of 82
Page 1 of 4 1 2 3 4