Search:

Type: Posts; User: Xanz1441

Search: Search took 0.01 seconds.

  1. Thread: size_t help

    by Xanz1441
    Replies
    19
    Views
    3,641

    When i change it to size_t, the warnings go away,...

    When i change it to size_t, the warnings go away, but I get a runtime error when I run the program.
  2. Thread: size_t help

    by Xanz1441
    Replies
    19
    Views
    3,641

    size_t help

    I'm using the .find() function to search through a string like so




    int i;

    i = string.find("whatever");
  3. Replies
    13
    Views
    2,703

    Ok, now i've got this double...

    Ok, now i've got this



    double RecursivePower3(double& baseValue, double expPower){

    double powerValue;

    if (expPower == 0)
    return 1;
  4. Replies
    13
    Views
    2,703

    so i tried this double...

    so i tried this



    double RecursivePower3(double& baseValue, double expPower){

    if (expPower == 0)
    return 1;
    if (expPower == 2)
    return baseValue;
  5. Replies
    13
    Views
    2,703

    I still don't understand where I should call the...

    I still don't understand where I should call the function inside the function to make it recursive.
  6. Replies
    13
    Views
    2,703

    we're supposed to write a recursive solution...

    we're supposed to write a recursive solution implementing that equation i gave at the beginning. The code I gave gives the right answers, it's just not the method wanted.
  7. Replies
    13
    Views
    2,703

    Recursive solution?

    I've been tasked to come up with a recursive solution to

    X^n = (X^(n/2))^ 2 if n is even

    X^n = (X * ((X^(n/2))^2)) if n is odd

    now here's the function i've written so far
  8. Thread: string arrays

    by Xanz1441
    Replies
    11
    Views
    1,672

    Alright, I think i've got it to read the words...

    Alright, I think i've got it to read the words alright, but now the counts are all off for some reason. Can't figure out why.



    #include <iostream>
    #include <fstream>
    #include <cctype>...
  9. Thread: string arrays

    by Xanz1441
    Replies
    11
    Views
    1,672

    Ok, so I think i've got it to read in the words...

    Ok, so I think i've got it to read in the words and store them fine except for it keep storing spaces too for some reason. Also I can't seem to figure out how to run each word I form through the...
  10. Thread: string arrays

    by Xanz1441
    Replies
    11
    Views
    1,672

    string arrays

    Hi, i'm new to the boards so please don't flame me too much if this is too easy.

    I'm trying to read from a file that contains a couple paragraphs of sentences and the point is to read each word...
Results 1 to 10 of 10