When i change it to size_t, the warnings go away, but I get a runtime error when I run the program.
Type: Posts; User: Xanz1441
When i change it to size_t, the warnings go away, but I get a runtime error when I run the program.
I'm using the .find() function to search through a string like so
int i;
i = string.find("whatever");
Ok, now i've got this
double RecursivePower3(double& baseValue, double expPower){
double powerValue;
if (expPower == 0)
return 1;
so i tried this
double RecursivePower3(double& baseValue, double expPower){
if (expPower == 0)
return 1;
if (expPower == 2)
return baseValue;
I still don't understand where I should call the function inside the function to make it recursive.
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.
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
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>...
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...
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...