I'm given a source file:
int main()
{
bool running = true;
string pre_sum;
int fib_th;
while (running)
{
cout << "Which Fibonacci number would you like me to compute ? ('q' to quit) ";
cin >> pre_sum;
fib_th = atoi(pre_sum.c_str());
if ( pre_sum[0] == 'q' )
{...
I want to infinitely print a saying to the console but I am not allowed to used iostream.
I am using the function putc. I understand I need to use an infinite loop. So far I have:
int main()
{
char *word;
word = &SAYING[0];
while(true)
{
putc(*word, stdout);
word ++...
I have an assignment for my CS class.
It is the following:
*
* complete the function:
*
* timesFound(string searchIn, char searchFor);
*
* The function should return the number of times the
* character searchFor appears in the string searchIn.
*
*/
int timesFound(string...